| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 734 人关注过本帖
标题:请问下FWRITE的调库文件名应该是哪个?
只看楼主 加入收藏
hzwk0814
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-9-27
收藏
 问题点数:0 回复次数:1 
请问下FWRITE的调库文件名应该是哪个?

#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *fp;
int a[8],*p=a;
if ((fp=fopen("c:\\tc\\1234.txt","wb"))==NULL)
{
printf("\n can not open file! \n");
exit(0);
}
while (p<a+8)
scanf("%d",p++);
fwirte(a,size(int),8,fp);
fclose(fp);
}

这个是从键盘上读取8个整形数据 ,哎问题又来了!!
error C2065: 'fwirte' : undeclared identifier
C:\tc\26\26.cpp(14) : error C2065: 'size' : undeclared identifier
C:\tc\26\26.cpp(14) : error C2144: syntax error : missing ')' before type 'int'
C:\tc\26\26.cpp(14) : error C2059: syntax error : ')'
执行 cl.exe 时出错.

26.exe - 1 error(s), 0 warning(s)

搜索更多相关主题的帖子: FWRITE 文件名 整形 int 
2006-10-06 00:38
csight
Rank: 1
等 级:新手上路
威 望:1
帖 子:293
专家分:0
注 册:2006-6-11
收藏
得分:0 
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *fp;
int a[8],*p=a;
if ((fp=fopen("c:\\tc\\1234.txt","wb"))==NULL)
{
printf("\n can not open file! \n");
exit(0);
}
while (p<a+8)
scanf("%d",p++);
fwrite(a,sizeof(int),8,fp); /* 两个错误!! */
fclose(fp);
}
fwrite()的头文件就是在"stdio.h"(基本的输入输出头文件)里面.

头可断,发型不可乱;血可流,皮鞋不可不擦油;
2006-10-06 08:47
快速回复:请问下FWRITE的调库文件名应该是哪个?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025808 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved