I need to read symbol-by-symbol. But I don\'t know how to read until end of input. As exemple test system will cin>>somecharvariable m times. I have to read symbol-by-symbol
Try this:
#include using std::cin; using std::cout; int main(int argc, char *argv[]) { char ch; unsigned m = 10; while (cin && m--) { cin.read(&ch, sizeof(ch)); cout << ch; } return 0; }