Some C++ :p

Read content of file to stringstream


int main()
{
    std::ifstream file( "myFile" );

    if ( file )
    {
        std::stringstream buffer;

        buffer << file.rdbuf();

        file.close();

        // operations on the buffer...
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *