由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - fprintf in C\C++
相关主题
大家帮我看看C文件输入函数fprintf的问题C++的smart pointer注定是个二流的东西
using gnuplot in c++ question请问怎样在C/C++里取联机的windows phone 里的图片? (转载)
[合集] Why it only write the file once?[合集] 谭浩强的那本C++的书怎样?C++初学书哪本最好?
请教一个用matlab tcpip函数的问题添加C++ std lib
Path with non-ascii character$5卖Essential C++ 中文版
New C++ programmer, need to ask a I/O file read questionprintf("%s\n", NULL)的结果
a C/C++ fopen mode questionis perror() non-buffered io in linux ? (转载)
A C++ exception question关于fscanf格式化读取的问题.
相关话题的讨论汇总
话题: fprintf话题: c++话题: file话题: data话题: hard
进入Programming版参与讨论
1 (共1页)
i****d
发帖数: 255
1
Hi, I have a question about the fprintf in C\C++. Usually we open a file
with fopen,
write data to that file with fprintf. Before we close the file, however, we
may see that the date file is essentially empty, meaning that the program
just wrote the data to some buffer, instead directly wrote them to the hard
driver. So my question is:
is there any function which would force fprintf write data to hard driver at
the real time or with the minimum delay?
Many thanks!
a***s
发帖数: 614
2
No, it is controlled by OS.
T*******i
发帖数: 4992
3
fflush

we
hard
at

【在 i****d 的大作中提到】
: Hi, I have a question about the fprintf in C\C++. Usually we open a file
: with fopen,
: write data to that file with fprintf. Before we close the file, however, we
: may see that the date file is essentially empty, meaning that the program
: just wrote the data to some buffer, instead directly wrote them to the hard
: driver. So my question is:
: is there any function which would force fprintf write data to hard driver at
: the real time or with the minimum delay?
: Many thanks!

n********a
发帖数: 119
4
set fflush as NULL
man fflush

【在 a***s 的大作中提到】
: No, it is controlled by OS.
1 (共1页)
进入Programming版参与讨论
相关主题
关于fscanf格式化读取的问题.Path with non-ascii character
One network C questionNew C++ programmer, need to ask a I/O file read question
又一个GDB的问题:关于显示数据a C/C++ fopen mode question
c的文件写入问题A C++ exception question
大家帮我看看C文件输入函数fprintf的问题C++的smart pointer注定是个二流的东西
using gnuplot in c++ question请问怎样在C/C++里取联机的windows phone 里的图片? (转载)
[合集] Why it only write the file once?[合集] 谭浩强的那本C++的书怎样?C++初学书哪本最好?
请教一个用matlab tcpip函数的问题添加C++ std lib
相关话题的讨论汇总
话题: fprintf话题: c++话题: file话题: data话题: hard