i have a hello program that asks for your name and the says hello then the name you input
#include <iostream.h>
#include <string>
int main ()
{
char name;
cout << "Enter your name : ";
cin >> name;
//print out the text string "Hello";
cout << "Hello \a" << name;
return 0;
}
but instead of giving the whole name inputted it gives just the first letter
so it looks like this
c:\ > hello.exe
Enter your name : Joe
Hello J
why is this?