Creating a map with a new object type
Hi all,
I'm using the standard map library and I was wondering if it is possible to create a map with a type value created by me (in this case, class "User" type).
I was looking for something like this:
Code:
#include "User.h"
#include <map>
#include <string>
(...)
map <string, User> users;
Is this possible? If yes, how?
Many thanks,
Joćo
P.S.: I don't know if it is relevant but I'm not using g++, I'm using Visual C++ 2008 Express Edition since I'll need to design a GUI to this project. I'm saying this because I think sometimes there are some differences between "standard C++ code" and Visual C++ code.