mercredi 28 mars 2018

what's the error in writing the data to this file?

why file doesn't work

                            #include <iostream>
                            #include <fstream>
                            #include <iomanip>    
                            using namespace std;
                            int main() {
                            ofstream out("blah.txt");

open file

                            float val = 10.5; 

intial value

                            out << val << endl;

write value

                            out.close();
                            return 0;
         }

Aucun commentaire:

Enregistrer un commentaire