Click to See Complete Forum and Search --> : Header for CString


fero45
December 7th, 2004, 02:38 PM
Hi
I want to use CString in a console application. What header file shall I use?
Thanks
Fero

JMS
December 7th, 2004, 03:04 PM
file find in your mfc include directory for "class cstring". and you can find the exact include....

or you could just hit f1 on the cstring object and see that the constructor tells you to include "afx.h"

Paul McKenzie
December 7th, 2004, 03:06 PM
Hi
I want to use CString in a console application.
Why? Use std::string and you don't need MFC.
What header file shall I use?afxtempl.h, but seriously consider using the standard C++ classes and its containers for console apps, unless there is something in MFC that is absolutely unavailable or difficult to implement otherwise.

Regards,

Paul McKenzie

Andreas Masur
December 7th, 2004, 04:08 PM
Besides that I agree with Paul...the following FAQ (http://www.codeguru.com/forum/showthread.php?s=&threadid=231164) should help...