Cstring not recognized

Hi,

I have Cstrings as members of a couple of classes in my project. I have included the <cstring>, <string> & <iostream> headers -- however, I still get multiple cstring related errors.

Below is one the code for one of the classes:

struct SMAFInfoHeader
{
SMAFInfoHeader ():
strFileType (_T("")),
strChannels (_T("")),
strArtist (_T("")),
strTitle (_T(""))
{
}
CString strFileType;
CString strChannels;
CString strArtist;
CString strTitle;
int bit_rate, sampling_rate, length;
};

Here are one of the few errors:

c:\audiotools\trunk\parsers\SMAF_file\SMAFInfoTips\SMAFInfoShlExt.cpp(63) : error C2146: syntax error : missing ';' before identifier 'strFileType'
c:\audiotools\trunk\parsers\SMAF_file\SMAFInfoTips\SMAFInfoShlExt.cpp(63) : error C2501: 'SMAFInfoHeader::CString' : missing storage-class or type specifiers

Any suggestions?

Thanks,
Ashlesha.
[1062 byte] By [ashlesha24] at [2007-11-20 11:58:35]
# 1 Re: Cstring not recognized
CString is an MFC class and it's defined in AFX.H header.

Not in cstring, not in string, not in iostream.
ovidiucucu at 2007-11-11 4:01:55 >
# 2 Re: Cstring not recognized
If you want to use strings as defined in <string>, the type is "string"

string str="hello world";

and please use code tags when posting code
bovinedragon at 2007-11-11 4:02:47 >
# 3 Re: Cstring not recognized
If you want to use strings as defined in <string>, the type is "string"

string str="hello world";

and please use code tags when posting code
And it's in the namespace std. ;)
cilu at 2007-11-11 4:03:56 >