Click to See Complete Forum and Search --> : error C2065: 'CString' : undeclared identifier
misst
April 20th, 2004, 05:39 AM
Hi!!
Compiling from vc++ 6.0 to vc++ 7.0 it gives me this error:
error C2065: 'CString' : undeclared identifier
why??
What do I have to do??
i haven't found anything on web!
thank you
Andreas Masur
April 20th, 2004, 07:13 AM
What kind of application is that? Console one? MFC one?
DeepButi
April 20th, 2004, 08:53 AM
Did you#include atlstr.h>?
(it should be a "<" before atlstr but the rest of the line gets removed if I post it :confused: )
misst
April 20th, 2004, 10:56 AM
thankyou!!
I was missing include <atlstr.h>:D
rajshreedugar
April 9th, 2009, 03:26 AM
Caution:-
If you directly access the CString variable in a Win32 console application, you will get the address and not the content. In order to access the content of the variable you need to convert it to a native C++ type (for eg: std::string). My suggestion is to use std::string instead unless it is absolutely necessary to use CString. It is very much possible to use CString but not recommended due to conversion overhead. Pick your choice.
Cheers,
Rajshree Dugar
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.