I am a nub at C++, and I have a stupid question. Let me say that I have also googled, but that managed to confuse me more.
In the simple program I am trying to get to work, I want to ask the person their name, then print a response.
Where I need help is, is how to let variable A be a string of text, I have no idea how to do this, or if I should be even using a variable.
hep?
outputs
Is it because I touch myself at night?
In the simple program I am trying to get to work, I want to ask the person their name, then print a response.
Where I need help is, is how to let variable A be a string of text, I have no idea how to do this, or if I should be even using a variable.
hep?
Code:
#include <iostream>
int main (int argc, char * const argv[]) {
char a;
std::cout << "what is your name?\n";
std::cin >> a;
std::cout << a;
std::cout << " is a nub\n";
return 0;
}
Code:
what is your name?
matt
m is a nub
Is it because I touch myself at night?