joab
0
Q:

print contents of cpp file

#include <iostream>
#include <fstream>

int main()
{
    std::ifstream f("file.txt");

    if (f.is_open())
        std::cout << f.rdbuf();
}
0

Tags

New to Communities?

Join the community