I have a very simple question, which I solved yesterday but forgot how I did it today! LOL
So it is like this:
I have a program written in C++ which in CMD writes: " Type your name to proceed"...
And in the program i set a special name, and when the user types it in the program, then it proceeds.
The problem is, that...I cannot state the variable as:
int z; nor char z;
BECAUSE I want to type in some letters in CMD and the program stores the TEXT into the variable..and none of them (int, char) can do it. Yesterday I somehow guessed, it was another name in front of the variable but now I cannot find it ( I know I am lame ).
:::::::::::::::::::::::::::::::::::::::::::::::::
#include <iostream>
using namespace std;
int main()
{
char z; We want to change this " char" into a word that would be compatibile as a variable with text, not numbers.
cout<<"Please enter a number:""\n";
cin>>z;
cin.get();
cout<<"You entered: " << z << "\n";
cin.get();
}
And people, please do not give me very complicated solutions, the whole thing is about stating the variable "z" as something else but "int" or "char". It is one word that would make the whole thing work, please help me :P