K
KevinSimonson
I'm trying to figure out how to use type "CString". I'm looking at
"http://msdn.microsoft.com/en-us/library/aa314317(VS.60).aspx",
and it indicates I
should be able to write the program below using a constructor that
takes as argument a C
string literal.
#include <cstring>
#include <iostream>
#include "stdafx.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
CString abc( "abc");
cout << "Variable \"abc\" has value \"" << abc << "\".";
return 0;
}
But when I try to compile this I get the error message: "1>c:\<path>
\cstringtest\
cstringtest\cstringtest.cpp(11): error C2065: 'CString' : undeclared
identifier". Is
there a header file that I need to include before the compiler can
recognize "CString"? I
had thought that <cstring> was such a header file. Is there another
one that I should be
using?
Kevin S
"http://msdn.microsoft.com/en-us/library/aa314317(VS.60).aspx",
and it indicates I
should be able to write the program below using a constructor that
takes as argument a C
string literal.
#include <cstring>
#include <iostream>
#include "stdafx.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
CString abc( "abc");
cout << "Variable \"abc\" has value \"" << abc << "\".";
return 0;
}
But when I try to compile this I get the error message: "1>c:\<path>
\cstringtest\
cstringtest\cstringtest.cpp(11): error C2065: 'CString' : undeclared
identifier". Is
there a header file that I need to include before the compiler can
recognize "CString"? I
had thought that <cstring> was such a header file. Is there another
one that I should be
using?
Kevin S