Frank, you wrote to Cliff Rhodes:
FM> Is there a way to enter and retrieve a string like a
FM> first and last name all in one string using the iostream
FM> library? I seem not to have any examples that provide for
FM> that. One seems to have to set up for FIRSTNAME and
FM> LASTNAME as separate strings.
FM> If this is wrong, please give me one or two lines that
FM> show how it CAN be done.
Is this what you are looking for?
#include
int main(void) {
char name[80];
cin.get(name, sizeof(name));
cout << name << endl;
return 0;
}
Bye,
Erik
---
---------------
* Origin: WarmelinkE@vertis.nl (2:282/608.60)
|