Next: How do I specify
Up: class and struct
Previous: How do I write
Include iostream and use the operator
. For a string of undefined
length, use getline.
float f;
char str[255];
std::cin >> f;
std::cin.getline(str, 255);
Alexis Angelidis (PhD)
2005-01-11