Just started learning C++
Ok, I just started learning C++ so please bear with me. Me and a friend are learning together and making a simple program where someone enters their name and have the program print their name.
Thats just a little bit of the code, im just not sure how to get it working because when i type in any name at all it prints this out: Your name is 2.
cout << "Enter your name:\n";
cin >> name;
cout << "your name is " << name << ".\n";
I don't know why it keeps printing 2 instead of the name.