Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vector of Vector of Strings

Status
Not open for further replies.

cppdev

Programmer
May 12, 2003
23
US
Would this :

vector <string>VRow;
vector <VRow> VColumn;

be valid ?

if so how would one access VRow to add/delete/edit ?

Thanks in advance,
 
no,
use
typedeg vector <string> VRow
vector <VRow> VColumn;


or
vector <vector<string> > stringTable;



Ion Filipski
1c.bmp
 
What would be correct syntax to access the row elements ( VRow ) ?


Thanks in advance
 
typedeg vector <string> VRow;
vector <VRow> VColumn;

VRow a;
VColumn x;
a.push_back(string(&quot;hello&quot;));
a.push_back((&quot;good bye&quot;));
x.push_back(a);

cout<< x[0][0].c_str()<< endl;
..

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top