I have been messing around some more with the for statement i have a question that has 5 possible answers and do this statement
cout << "question?\n";
getline(cin,answer1);
for (int i=0; i < 5 ; i++){
if (correct[i]==answer1)
cout << "do something!!\n\n";};
else{
cout << "do something!!\n\n";
break;};
then i compile it with g++ and it brings up with error
k.cpp: In function ‘int main()’:
k.cpp:19: error: expected primary-expression before ‘else’
k.cpp:19: error: expected `;' before ‘else’
i cant figure out where to put or take away the ; ??