this my code so far. it keeps giving me an error when i get to cin >> num part any ideas? what am I doing wrong
Code:
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
cout<<"Welcome to Kevin's Math quiz\n";
char name[50];
char lastname[50];
char fullname[100];
cout<<"Please enter your name: ";
cin.getline ( name, 50 );
cout<<"Enter your last name: ";
cin.getline ( lastname, 50 );
fullname[0] = '\0'; // strcat searches for '\0' to cat after
strcat ( fullname, name ); // Copy name into full name
strcat ( fullname, " " ); // We want to separate the names by a space
strcat ( fullname, lastname ); // Copy lastname onto the end of fullname
cout<<"Welcome "<< fullname <<"\n";
cout<<"Are you ready to begin the test? ( Enter 1 if your not rdy ):\n";
cin>> num;
while ( num == 1 )
{
cout << "Thank You!" << endl;
Are you ready to begin the test? ( Enter 1 if your not rdy )
cin >> num
}
cout << "You entered: " << num << endl;
cin.get();
}