#include <iostream.h>
#include <stdlib.h>
char name[4];
void main()
{
cout<<"Please enter your name:";
cin.getline(name, 4, '/n');
cout<<"Your name is"<<name;
return 0;
}
I don't see a thing wrong with it. Today is my first day learning, so I sorry if I'm being a retard.
It pops up in the DOS window and kills itself when I input my four-letter name Jeff. Any ideas?