try it :FILE *stream;
char line[80];while ((fscanf(stream, "%[^\n]", line)) != EOF )
{
printf("Line = %s \n",line);
}
The following code demonstrates the second method above to work around this problem: FILE *stream;
char line[80];while ((fscanf(stream, "%[^\n]", line)) != EOF)
{
fgetc(stream); // Reads in '\n' character and moves file
// stream past delimiting character
printf("Line = %s \n", line);
}
char line[80];while ((fscanf(stream, "%[^\n]", line)) != EOF )
{
printf("Line = %s \n",line);
}
The following code demonstrates the second method above to work around this problem: FILE *stream;
char line[80];while ((fscanf(stream, "%[^\n]", line)) != EOF)
{
fgetc(stream); // Reads in '\n' character and moves file
// stream past delimiting character
printf("Line = %s \n", line);
}
解决方案 »
- 请问DLL中如何初始化socket?
- 关于ODBC的问题
- wtl的开发界面中,怎样在cstatic text控件里面显示不同字体的文字和图片?
- 求SUSAN边缘检测的VC代码
- 求vc2005环境的数据库编程demo!
- 数字和字符转换AsscII码,再把AsscII码转换成数字或字符,字符只包括(a-z)(A-Z),VC下怎么实现啊,急啊,谢谢了,马上解决,立刻给分......................................................
- 关于TreeCtrl的消息响应问题
- 奇怪问题,把一句话分两句就有问题?
- 谁知道浩方对战平台的原理
- 小问题, Socket接收!!
- Dll处理文件的问题
- 一个对话框的小问题?
比如日期,int, float,etc.