I am writing a brute-force program to enumerate a certain type of integer sequence (what exactly does this sequence Not important)
To get my results, I will create a file and I would like to write all program output in this file. However, it seems that the file is "stable" in the 524Kb, even if the program should write something. To wit. The file is delivered to a file size of up to 524.0kb, and then nothing else is written in the file.
I know that some files should be written because every time I write something like this, I have a message on the printf
screen so that I know something is going on.
I am using C (very low level, i.e. only stdio.h
, stdlib.h
, time.h < / Code>,
string.h
) at ubuntu 10.04.
Create the file as follows:
time_t rawtime; Four timestamps [20]; Structure TM * clock time; Time (& amp; rawtime); Clock time = local time (and raw time); Striptime (timestamp, 20, "% Y% m% d_% h% m% s", clocktime); Four dimestamps [80]; Sprintf (Dmstamp, "D% DL% d_", Dimension, MAXDEPTH); Dome (dimStamp, timestamp); Dome (dimStamp, ".txt"); FILE * Output = FOPN (Dmstamp, "W");
Has anyone suffered a similar problem and / or does anyone know what this can be?
Edit:
Could it be that the output is somewhat asynchronous to file in C, i.e. to flush something buffer or something to write the file instantly To do?
Calling can sometimes solve this problem, you should also check if your data There may be binary data and you prevent the EOF characters from binary mode ( "wb"
instead of w
) to prevent IOF.
Comments
Post a Comment