Hello DaniWebbers,
How would I go about taking user input into a string? It is not allowing me to do:
#include <iostream>
#include <string>
using namespace std;
int main() {
string users_name; // Reserved for the users name (input)
cout << "Enter your name: ";
cin >> users_name; // Compilation error 'No operator matches these operands'?
getchar();
return 0;
}
I can't use "cin" nor "cin.getline()", not even "getline(cin,users_name)"...How do I get input form the user then put it into a string?
Thanks,
-camelCase