![]() |
| ||
| Help with a vector<vector<string> *> Hi, for a class, I'm trying to implement a separate-chaining hash table stored in a vector that contains pointers to vectors where the keys will be stored. This is basically what I have: typedef vector<string> KeyChain; The problem I'm having is when I want to access the keys in the KeyChain, I don't know how to get to those values, this is what I've tried: Table[value][index] What is the syntax for accessing the items in a vector that is referenced with a pointer in another vector? Thank you for your help! |
| ||
| Re: Help with a vector<vector<string> *> Welcome squall1986, Use may use : (*(Table[index]))[index]; |
| ||
| Re: Help with a vector<vector<string> *> Quote:
vector<string> *Table; So I'll be doing that, but thanks for the help! |
| ||
| Re: Help with a vector<vector<string> *> So, where is a problem? vector<string> *Table; |
| ||
| Re: Help with a vector<vector<string> *> Quote:
|
| All times are GMT -4. The time now is 9:13 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC