scanf char vectors
how can I insert data for each vector and even if it is possible that vector can be char ( bad english lol :( )
code have to be someting like this :
1 2 3 4 5 6 7 8 9 10
|
vector <char> name,surname,number;
int n;
cin>>n;
name.resize(n);
surname.resize(n);
number.resize(n);
for(i=0;i<n;i++)
{
scanf("%c:%c:%c",&name[i],&surname[i],&number[i]);
}
|
this doesn't work I know but if someone can explain me this i would appreciate <3
Topic archived. No new replies allowed.