Untitled

 avatar
unknown
c_cpp
a year ago
319 B
4
Indexable
#include <fstream>
#include <iostream>

int main()
{
    std::fstream plik( "write_test.tmp", std::ios::out );

    if( plik.good() )
    {
        for( int i = 1; i <= 100; ++i )
        {
            plik << i << ", ";
            plik.flush();
        }
    }

    plik.close();

    return 0;
}
Editor is loading...
Leave a Comment