How to create a list of tuples C++

Viewed 42266

I am fairly new to c++, I dont really have any background in it. I am tying to create a list of tuples, the first will be an int, the second will be a string.

  #include <string>
  #include <list>
  #include <boost/tuple/tuple.hpp>
  ....
  list< tuple<int,string> > time;

And getting an error. I want to be able to create a list, add entries that I can sort by the int, and have the string that describes, what the int was.

How would I create this list?

4 Answers
Related