I'm probably missing something blatant as I'm new to C++. However, I can't seem to get CString to work. At the moment I'm just trying a test line, copied from VStudio help to try to get it to work. I'm using:
#include <string.h>
CString strName = _T("Name"
;
(I'm not entirely sure if it is needed, but I've also included string.h) Everytime I try to compile I just get the following errors:
Error C2065: 'CString': undeclared identifier
Error C2065: 'strName': undeclared identifier
Error C2146: syntax error: missing ';' before identifier 'strName'
As far as I can tell all these errors are generated by the fact that it is not recognising CString as a valid type. The only #include that I am aware of possibly needing is string.h so why is this happening?
The same errors are generated with:
CString strName;
CString strName = "";
strName CString(_T(""
);
Many thanks
#include <string.h>
CString strName = _T("Name"
(I'm not entirely sure if it is needed, but I've also included string.h) Everytime I try to compile I just get the following errors:
Error C2065: 'CString': undeclared identifier
Error C2065: 'strName': undeclared identifier
Error C2146: syntax error: missing ';' before identifier 'strName'
As far as I can tell all these errors are generated by the fact that it is not recognising CString as a valid type. The only #include that I am aware of possibly needing is string.h so why is this happening?
The same errors are generated with:
CString strName;
CString strName = "";
strName CString(_T(""
Many thanks