file handling

Started by
9 comments, last by SiCrane 16 years, 3 months ago
If all you want to do is print the same file over and over again, then you've vastly over-complicated the process.
  for (;;) {    std::ifstream ifs("main.cpp");    std::cout << ifs.rdbuf() << std::endl;  }

Secondly, please learn to use the [code] and [source] tags.

This topic is closed to new replies.

Advertisement