const string in_file{"loghelp.txt"};
    if (std::ifstream in{in_file})
    {
            std::cout << "Read " << in_file << std::endl;
            std::cout << "##########################################################\033[32m" << std::endl;
    std::istreambuf_iterator<char> begin(in);
    std::istreambuf_iterator<char> end;
    std::string loghelp(begin, end);
    std::cout << loghelp;
            std::cout << "\033[0m##########################################################" << std::endl;
    }
    else
            std::cout << in_file << " file open error" << std::endl;

Tag: none

Add a new comment.