Hi I'm a student majoring a computer .
I tried to make a simple hashing table like (int) 1 , (std::string) "One"
There is a problem in using std::map ㅜㅜ
this is a simple code.
PLZ~~Help me :)
[CODE=cpp]#include <iostream>
#incluce <map>
int main()
{
std::map<int ,std::string> test ;
test.insert(std ::make_pair(1," as"));
test.insert(std ::make_pair(2," as"));
std::map<int,st d::string>::ite rator start = test.begin();
std::map<int,st d::string>::ite rator last = test.end();
for(start ; start != last ; ++start )
{
std::cout << start->first ;
std::cout << "\t" ;
// std::cout << start->second <<std::endl; //it does not work
}
}[/CODE]
Thank you^^;
I tried to make a simple hashing table like (int) 1 , (std::string) "One"
There is a problem in using std::map ㅜㅜ
this is a simple code.
PLZ~~Help me :)
[CODE=cpp]#include <iostream>
#incluce <map>
int main()
{
std::map<int ,std::string> test ;
test.insert(std ::make_pair(1," as"));
test.insert(std ::make_pair(2," as"));
std::map<int,st d::string>::ite rator start = test.begin();
std::map<int,st d::string>::ite rator last = test.end();
for(start ; start != last ; ++start )
{
std::cout << start->first ;
std::cout << "\t" ;
// std::cout << start->second <<std::endl; //it does not work
}
}[/CODE]
Thank you^^;
Comment