-
February 14th, 2003, 04:04 AM
#1
C++ String: What is the difference between 'CString' and 'std::string'?
Q: What is the difference between 'CString' and 'std::string'?
A: 'CString' is a MFC class and can be used only for Windows programs that are statically or dynamically linked to the MFC. Use 'CString' when you write MFC programs.
'std::string' is a Standard C++ class - in other words, it is part of the C++ programming language. It is a very powerful class that can be used in any kind of Windows programs (MFC, Win32, Win32 Console) as well as in non-Windows programs.
'CString' and 'std::string' can be mixed, if you know what you are doing and you take some precautions.
Last edited by Andreas Masur; July 24th, 2005 at 06:36 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|