-
September 26th, 2003, 04:25 PM
#1
Replacing MFC
Unfortunatley, long ago I got tied into the MFC world. Now regretting that mistake I'm trying to work my way back to the true way ... I have a few old classes written in C++ that I'm trying to port back to the non-MFC world. I've worked almost all of it out except I'm still using CobList. Unable to find a quick replacement I've been looking to alternatives such as creating a dll to load the class and worrying about it later but then I read that if the application is non-MFC then I will not be able to pass the class back to my functions. Looks like a dll will get me nowhere Any ideas for the easiest way to get CobList out of my code??? I do a lot of list walking, addTail, addHead calls. I'm moving over to Dev-C++ as my IDE but I still have VS available to me.
Thanks for the time,
Devan
-
September 26th, 2003, 04:44 PM
#2
Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.
-- Sutter and Alexandrescu, C++ Coding Standards
Programs must be written for people to read, and only incidentally for machines to execute.
-- Harold Abelson and Gerald Jay Sussman
The cheapest, fastest and most reliable components of a computer system are those that aren't there.
-- Gordon Bell
-
September 26th, 2003, 04:59 PM
#3
Re: Replacing MFC
Originally posted by DevLip
Unfortunatley, long ago I got tied into the MFC world. Now regretting that mistake I'm trying to work my way back to the true way :D ... I have a few old classes written in C++ that I'm trying to port back to the non-MFC world. I've worked almost all of it out except I'm still using CobList. Unable to find a quick replacement
As Graham pointed out, std::list is what you're looking for. Also, if you used CString, I hope you knew about std::string.
I do a lot of list walking
Iterators
std::list::push_back()
std::list::push_front()
I'm moving over to Dev-C++ as my IDE but I still have VS available to me.
std::list is available in all ANSI C++ compilers that implement the standard C++ library. This includes VC++, Borland C++, Gnu C++, and basically any modern C++ compiler.
I suggest you pick up "The C++ Standard Library" by Nicolai Josuttis to help you learn what MFC didn't teach you with respect to using the standard container classes.
Regards,
Paul McKenzie
-
September 26th, 2003, 11:25 PM
#4
STL MAN SAYS
BRAVO FOR YOU SIR!!!
Come away from the dark side.
Another book is Effective STL by Scott Meyers
Here is a link
http://www.sgi.com/tech/stl/
DEFENDER OF ALL THINGS STL!!!
-
September 26th, 2003, 11:38 PM
#5
There is a member ("Xeon") that was difficult to take seriously becasue he would say wild things and use colors and big fonts and such. He could have gotten a lot more help if he was more reasonable. As far as I know he is still around and I speak in the past tense only because he has not been around much.
People will take you more seriously if you omit the emotions and just state the important relevant facts. Use of big fonts and lots of colors will accomplish the opposite of what you want to do, unless you just want to make trouble.
-
September 27th, 2003, 12:00 AM
#6
STL MAN is not here to ask for help, but to provide it if possible.
If a passion for the STL and a willingness to express that passion
in a load voice is "causing trouble" then
STL MAN IS GUILTY AS CHARGED
DEFENDER OF ALL THINGS STL!!!
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
|