I just started an entry level C++ class and I am doing my first homework assignment. The code seems to work perfectly fine except for when the input includes a space in it, then it just skips over the rest of the questions of after the line the input was on.
I hope this makes sense!
// This program prompts the user a few general questions about themselves, the date, which IDE they are using, and which machine they have downloaded the IDE on to.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string userName, currentDate, softwareName, machineName;
//Ask the user his name.
cout << "What is your name? ";
cin >> userName;
//Ask the user the date.
cout << "What is the date? ";
cin >> currentDate;
//Asks the user which software he downloaded.
cout << "What is the name the IDE software you downloaded? ";
cin >> softwareName;
//Asks the user which machine he downloaded his IDE on.
cout << "Which machine did you download the IDE on? (ie. home computer, laptop, etc.) ";
cin >> machineName;
//Prints out the users inputs going downwards.
cout << "" << userName << endl;
cout << "" << currentDate << endl;
cout << "" << softwareName << endl;
cout << "" << machineName << endl;
return 0;
}