CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Replacing MFC

  1. #1
    Join Date
    Apr 2002
    Posts
    61

    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

  2. #2
    Join Date
    Apr 1999
    Location
    Altrincham, England
    Posts
    4,470
    std::list
    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


  3. #3
    Join Date
    Apr 1999
    Posts
    27,449

    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
    addTail
    std::list::push_back()
    addHead
    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

  4. #4
    Join Date
    Sep 2003
    Location
    STL LAND
    Posts
    15

    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!!!

  5. #5
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    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.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  6. #6
    Join Date
    Sep 2003
    Location
    STL LAND
    Posts
    15
    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
  •  





Click Here to Expand Forum to Full Width

Featured