vector<struct >
Heyy!
I create a struc :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
typedef struct pay
{
string name;
vector<string> v;
pay(string a)
{ name=a;
}
}pay;
int main()
{
vector<pay> t;
string s;
int n,i;
cin>>n;
for(i=0;i<n;i++)
{ cin<< s;k=0
t.push_back(pay(s));k++
cin<< s;
|
How can I get access to the vector v of t[k] ??
thx
t[k].v
So we can do :
t[k].v.push_back
???
Topic archived. No new replies allowed.