Chciałem przećwiczyć dodatkowe funkcje strumienia (świeżo zdobyta wiedza, to ich nie ma)
I pytanie czy taki program w ogóle ma coś wspólnego z sensem i ile znaków pomieści strumień
#include <iostream>
#include <sstream>
using namespace std;
void getput (istream & in, ostream & ou)
{
char a=' ';
while (a!='\n'&&(a= in.get())) ;
//..... nowe funkcje
ou.put(a);
}
int main(){
stringstream sstr;
string str;
//getput (cin,cout); // nie działa czy to błąd logiczny, czy jest tylko '\n'?
getput (cin,sstr); // nie działa czy to błąd logiczny, czy jest tylko '\n'?
sstr>>str;
cout<<str;
return 0;
}