Hello guys
this question gave me a syntax error
can anyone tell me how to write it in the right way ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# include <iostream>
# include <string>
usingnamespace std;
struct name
{
string sentence ;
} ;
int main ()
{
name array [100] ;
int counter = 0 , index [1000] ;
while (counter < 2 && getline (cin , array[counter].sentence ))
{
counter ++ ;
index [counter] = array[counter].sentence.length ;
}
system ("pause");
}