Witam. Mam problem ze zrobieniem petli while, gdzie warunkiem dzialania jest niebycie eof'em. Nie umiem tylko tego zapisac... Dostaje błąd kompilacji:
error C2228: left of '.eof' must have class/struct/union
nie wiem jak to zrobic ;[
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string wejscie;
while(!cin(wejscie).eof()) // nie dziala
{
cin >> wejscie;
string s(wejscie.begin(),wejscie.end());
string::iterator pos;
reverse (s.begin(), s.end());
cout << s << endl;
}
}