C++ file output -
All,
I'm not a programming fool, but the following code produces 0 byte files. I verified that the file name is correct, and files are created. I too went so far to read, write, and execute for all the files, and the files were reduced and specify that not only was made at all times, and still 0 byte files
fstream fs; Fs.clear (); Fs.open (datafileName.c_str (), fstream :: out | fstream :: trunc); Std :: cout & lt; & Lt; DataFileName.c_str () & lt; & Lt; Std :: endl; (Int jdx = 0; gddx & lt; the vertical profile- pt> & gt; matching number breaks (LE); ++ zdx) {FS & LT; & Lt; (Ididx = 0; idx and lt; thermalarrere [idx] [zdx]
Important parts of the code are missing. What is the dimension?
The rest of the code looks good, so I wrote a small test application that writes [1-6] to in the file named demo.txt . #include & lt; iostream & gt; # Include & lt; fstream & gt; Namespace STD's Yoga; Int main () {fstream fs; fs.clear (); Fs.open ("demo.txt", fstream :: out | fstream :: trunc); int theThermalArray [] [3] = {{1, 2, 3}, {4, 5, 6}}; int theNumberHorizontalPoints = 2; (Int jdx = 0; gdx and lt; 3; ++ zdx) {fs & lt; iidx} for (id idx = 0; IDX and LT; The number horizinal point; ++ IDX) ThermalArere [IDX] [zdx]
Comments
Post a Comment