kenjisamurai
Programmer
Ok I've figured out how to make a string variable. How do I get it to have a value? This little code down here produces errors at the user input line:
#include <iostream.h>
#include <string>
using namespace std;
int main()
{
string stupid;
cout << "Please type your name here:" << endl;
cin >> stupid;
cout << "\nYour name is " << stupid << "!";
return 0;
}
#include <iostream.h>
#include <string>
using namespace std;
int main()
{
string stupid;
cout << "Please type your name here:" << endl;
cin >> stupid;
cout << "\nYour name is " << stupid << "!";
return 0;
}