函数名: fgets
opencv 学习 2010-06-07 14:13:58 阅读16 评论0 字号:大中小 功 能: 从流中读取一字符串 用 法:
char *fgets(char *string, int n, FILE *stream);
形参注释:*string结果数据的首地址;n-1:一次读入数据块的长度,其默认值为1k,即1024;stream文件指针
序 例: #include #include int
main(void) { FILE *stream; char string[]
= "This is a test"; char msg[20]; /* open a file
for u...
阅读全文>>