Mail Archives: djgpp/1999/12/13/21:47:09
You need to have more than just a 'command'. You need to use something like
this:
#include <iostream.h>
int main()
{
char name[30]; // you need to make a space
for your input
cout << "Enter a name: " << endl;
cin.getline(name, 30,'\n'); // tell getline where to place
the input, and its size
cout << "Your name is: " << name << endl;
return 0;
}
Steve Hendrickson
----- Original Message -----
From: Roger <roger AT pepparkakor DOT demon DOT nl>
Newsgroups: comp.os.msdos.djgpp
To: DJGPP <djgpp AT delorie DOT com>
Sent: Monday, December 13, 1999 12:39 PM
Subject: Input?
> Hi everyone!
>
> I have one question! I know a command in Basic,but I can't use it in
> C++.Could anyone tell me how I make a input-command,so I can for example
> write in a name!
>
> Thanks..
>
>
- Raw text -