R
raz
Greetings all.
I apologize for what is almost certainly a stupid question, but I
can't figure this out, and have no more time for head bashing...
The short version: what is the appropriate include file to define the
CString type in an MFC based app?
The longer version:
I have a Windows App, in MFC and am trying to use CStrings in a class:
class foo
{
foo();
~foo();
public:
CString m_path;
void setFileName (CString name);
<etc>
}
but when compiling it, I get a boatload of compiler errors because
CString is apparently unknown as type.
c:\DNA\app\BDTS\BDTS\BDTS\FileSet.h(32): error C2146: syntax error :
missing ';' before identifier 'm_path'
If I include "stdafx.h" it will compile, but then later files in the
project fail to compile because WINDOWS is already defined.
I have tried #include <atlstr.h> which sort of works, but fails at
link time
and <cstringt.h> which does no good.
This has *got* to be simple and stupid (on my part), but I don't get
it...
Any help appreciated!
-raz.
I apologize for what is almost certainly a stupid question, but I
can't figure this out, and have no more time for head bashing...
The short version: what is the appropriate include file to define the
CString type in an MFC based app?
The longer version:
I have a Windows App, in MFC and am trying to use CStrings in a class:
class foo
{
foo();
~foo();
public:
CString m_path;
void setFileName (CString name);
<etc>
}
but when compiling it, I get a boatload of compiler errors because
CString is apparently unknown as type.
c:\DNA\app\BDTS\BDTS\BDTS\FileSet.h(32): error C2146: syntax error :
missing ';' before identifier 'm_path'
If I include "stdafx.h" it will compile, but then later files in the
project fail to compile because WINDOWS is already defined.
I have tried #include <atlstr.h> which sort of works, but fails at
link time
and <cstringt.h> which does no good.
This has *got* to be simple and stupid (on my part), but I don't get
it...
Any help appreciated!
-raz.