i want to declare an array of strings and want to input string via CIN command but it gives me an error i am trying to do this name1 name2 name3 . . . and so on... i am entering string to an array dynamical means input from cin
for CIN i use the following code like if i use 3 names to be entered
string arr[3];
for (int x=0;x<3;x++)
{
cout<<"enter name"<<x<<" ";
cin<<arr[x];
}
for(int z=0;z<3;z++)
cout<<arr[z];
it gives an error NO MATCH FOR CIN....
See Question&Answers more detail:os