Using the map STL

This is a discussion on Using the map STL within the C++ Programming forums, part of the General Programming Boards category; I have a homework problem dealing with coding the 0-1 knapsack problem greedily and dynamically. I am to use the ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    8

    Using the map STL

    I have a homework problem dealing with coding the 0-1 knapsack problem greedily and dynamically. I am to use the map STL for the dynamic implimentation, but am not familiar with it. I am looking for a good reference for using it, preferably showing it used to hold set information. I have found
    C++ Reference which shows the various methods of the class, but I would like more to go on before I dive in.

    Any help is appreciated, and I will try to answer any requests for more information.

    Also, the meat of the the assignment is analysis of the algoritms: running times, differences, effectiveness, and such. The instrustor said it was fine getting help with implimentation issues.

    Seth.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    http://www.devhood.com/tutorials/tut...utorial_id=379

    Just search google for

    STL Map Tutorial

    This was the first link, I'm sure others are better.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    8
    Thanks. Guess I need to get better at formatting google searches. I looked for "c++ stl map using" and it returned a lot of message board posts.

    Thanks again, the tutorial you pointed to answered my questions.

    Seth

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Polynomials and ADT's
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 08-19-2008, 09:32 AM
  2. Problem with static STL i.e. map
    By vijay_choudhari in forum C++ Programming
    Replies: 2
    Last Post: 10-26-2007, 06:56 AM
  3. STL Map Object
    By nomes in forum C++ Programming
    Replies: 6
    Last Post: 09-11-2003, 02:51 PM
  4. Unsorted Map and Multimap :: STL
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 12-21-2002, 11:22 PM
  5. Searching STL Map Inside STL Map Object :: C++
    By kuphryn in forum C++ Programming
    Replies: 2
    Last Post: 11-14-2002, 09:11 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21