RSS Forums RSS
Please support our C++ advertiser: Programming Forums
Views: 403 | Replies: 2 | Thread Tools  Display Modes
Reply
Join Date: Jan 2008
Posts: 3
Reputation: sanzle is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sanzle sanzle is offline Offline
Newbie Poster

vector and map

  #1  
Feb 9th, 2008
i am trying to pair a vector and an integer but


map<vector[i][j],int>m;
m.insert(pair<vector[i][j],int>,(v[1][0],sum));

did not work??
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Posts: 203
Reputation: bugmenot is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 28
bugmenot bugmenot is offline Offline
Posting Whiz in Training

Re: vector and map

  #2  
Feb 9th, 2008
what is "vector[i][j]" supposed to mean?
Reply With Quote  
Join Date: Feb 2006
Location: India
Posts: 53
Reputation: HackWizz is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
HackWizz HackWizz is offline Offline
Junior Poster in Training

Re: vector and map

  #3  
Feb 10th, 2008
By definition of maps compare what are you doing right now and what do you want it to do.May be what you want is
map<vector<vector<int> >,int > m;
vector<vector<int> > vvi;
int i;
m.insert(make_pair(vvi,i));
Hope it helps!
return 0;
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:21 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC