473,388 Members | 1,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

CString undefined in C++ after conversion to .NET?

Hi all,

Just converted our 95 project workspace file from VC++
6.0 to .NET, and things have gone...um...pretty well.
Down to the last of the suffering - our main server
application is doing something completely bizarre when
compiling. All of our applications use MFC, and this one
in particular is a console application - however, we have
lots more that are console applications where CStrings
work fine.

One thing that seems consistant: if we have a template
defined in the .H file where a CString is defined, those
CStrings seem to throw this error when we try to compile
them:

error C2079: 'csKey' uses undefinded class CString

It's almost like something is getting whacked after the
compiler sees a template, because we replaced every
CString definition (that's in the same file as a template
usage) with this:

CStringT< TCHAR, StrTraitMFC< TCHAR > >

And then it compiles fine.

I've been reading a lot that a CString is now a
template'd class, but I'm still not sure how to resolve
this issue. We're trying to narrow it down to exactly
what's different between this and our other projects, but
it's quite painful.

Thanks for any help or avenues anyone can provide.

Jul 21 '05 #1
0 2400

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Markus Hämmerli | last post by:
I ' ll tra to convert a Cstring to char* without success. I working in a Unicode enabled environment this is working in Unicode CString source = _T("TestString"); TCHAR *szSource =...
9
by: Fausto Lopez | last post by:
I'm getting the following error: 'strlen' : cannot convert parameter 1 from 'class CString' to 'const char *' when I try to compile the following code: HRESULT AnsiToUnicode(CString pszA,...
5
by: Paul | last post by:
Hi, Any one knows how to convert CString to LPCWSTR? Please advice, thanks! -P
0
by: Chris | last post by:
Hi all, Just converted our 95 project workspace file from VC++ 6.0 to .NET, and things have gone...um...pretty well. Down to the last of the suffering - our main server application is doing...
5
by: Neo | last post by:
how convert CString to char *? regards, Mohammad Omer Nasir
0
by: npotnis | last post by:
Hi All, I am trying to compile an existing C++ unamanaged application with the /clr switch in VS.Net 2003, as I need to use managed extensions in the code. In a cpp file I have the following...
4
by: huguogang | last post by:
Just curious, any one know what the 3 part parameter "class CString filename" would mean. The code: int TestFunc(class CString filename) { fopen(filename, "w"); } Compile using Visaul C++,...
16
by: Norman Diamond | last post by:
In an antique obsolete version of MFC, a CString expression could be subscripted in order to retrieve one element. Visual Studio 2005 defines CSimpleStringT::operator. At first glance it looks...
1
by: YouPoP | last post by:
For a reason i don't know, if i convert a float to a cstring, it does not convert to an exact value for all values except round numbers or 1/2 numbers; the following code (used to convert and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.