I am trying to get this map to to store cutomer names and referenced by a id number. I cannot figure out why i am getting 18 errors. I am confused. here is the code, thanks in advance for any help.
Code:
#include <iostream>
#include <map>
#include <string>
using namespace std;
void main (void)
{
typedef map<int, string, less<int>> C;
C customer;
customer.insert(C::value_type(5, "Dave"));
customer.insert(C::value_type(45, "Jon"));
cout<<"PIN Number"<<'\t'<<"Name"<<endl;
C::const_iterator i;
for(i=customer.begin(); i!=customer.end(); ++i)
cout<<i->first<<'\t'<<'\t'
<<i->second<<'\n';
}