#include <iostream>
#include <string>
using namespace std;
int main()
{
string emailAddress, computerTyp, temp;
std::string address;
cout << "ITSx IT Solutions\n" << endl;
cout << "enter your email address : " << endl;
cin >> emailAddress;
std::cout << "enter address : " << std::endl;
//getline(cin, address);
//cin >> address;
for (int i = 0; i < 2; i++)
{
while (std::cin >> temp)
{
getline(std::cin, temp, ' ');
// use x
address += temp;
}
}
//cin >> address;
cout << "Enter the type of computer you need : "<< std::endl;
cin >> computerTyp;
cout << "Email Address : " << emailAddress << " Address : "<< address << " Computer Type : " << computerTyp << endl;
return 0;
}
I Want To Get To Get Line Separated With Spaces From User Input. And Display It On The Console.
So Whenever I Try To Add Address It Skips That Line And Goes To Computer Types Option I