Need help with CString!!!!
OK, this isn''t my day. I need a good string manipulation class right? I look up CString ans find it has all the good stuff (mid, ucase, concatenation, etc). So I make a simple program, include afx.h, and run it.
What the hell is "nafxcw.lib"??!?!?!?
Yeah, that''s right, I got an external link error. I looked in my Lib folder - nothing. I asked my buddy one desk over who has VC++6 (i have 4) and he couldn''t find it either. I decided to ask here before digging through MSDN.com for it. Any help??
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
Drew Sikora
Executive Producer
GameDev.net
If your using CString, you''ll probably end up pulling in the rest of MFC to get it working. Also CString has a few things that are a bit iffy (at least I think they are). You should probably have a look at std::string, it''s the header (no .h) and it''s part of standard C++.
Bah! You have just mentioned the devilish acronym! If it takes MFC to do the job - fogetta bout it. I''ll look up the std::string thingy, thanks for the info.
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
Drew Sikora
Executive Producer
GameDev.net
Actually, on second thought, is it possible to make a regular Win32 app and not #define WIN32_LEAN_AND_MEAN and still use all of MFC? Or do I have to use a class wizard? What I mean is, I create the window and everything through code and then use CString. Since I never cut loose MFC it should work right? In my earlier post, I was using a console app, not a Win32 app.
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
Drew Sikora
Executive Producer
GameDev.net
October 02, 2000 09:18 AM
In order to use CString, you are going to need to include MFC headers and link against the MFC libraries. Search www.microsoft.com in the knowledgebase area for information on adding MFC support to a non MFC project.
You might be better off just creating a new project that supports MFC.
Like the previous poster mentioned, std::string is an excellent alternative to CString.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement