This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
cpp:stringstreams [2019/05/20 08:39] gthanos |
cpp:stringstreams [2019/05/21 19:49] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== String streams ====== | ||
| - | Εκτός από τις κλάσεις για ανάγνωση ή εγγραφή από αρχείο ή τα //stdin// και //stdout// η // | ||
| - | |||
| - | * **istringstream: | ||
| - | * **ostringstream: | ||
| - | * **stringstream: | ||
| - | |||
| - | <code cpp stringstream.cpp> | ||
| - | #include < | ||
| - | int main() { | ||
| - | stream sstream; | ||
| - | | ||
| - | sstream << " | ||
| - | while( !sstream.str().empty() ) { | ||
| - | string token; | ||
| - | sstream >> token; | ||
| - | cout << token " "; | ||
| - | } | ||
| - | cout << endl; | ||
| - | } | ||
| - | </ | ||