C语言出现for information on how you program can cause an assertion failure#include #include #include #include #include #define MAX 100typedef struct { char dm[5] ; /*产品代码*/char mc[11] ; /*产品名称*/int dj ; /*单价*/int sl ; /*数量

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 00:35:40

C语言出现for information on how you program can cause an assertion failure#include #include #include #include #include #define MAX 100typedef struct { char dm[5] ; /*产品代码*/char mc[11] ; /*产品名称*/int dj ; /*单价*/int sl ; /*数量
C语言出现for information on how you program can cause an assertion failure
#include
#include
#include
#include
#include
#define MAX 100
typedef struct
{ char dm[5] ; /*产品代码*/
char mc[11] ; /*产品名称*/
int dj ; /*单价*/
int sl ; /*数量*/
long je ; /*金额*/
}PRO ;
PRO sell [MAX] ;
void ReadDat() ;
void WriteDat() ;
void SortDat()
{
int i,j;
PRO xy;
for(i=0;isell[j].je)
{xy=sell[i];sell[i]=sell[j];sell[j]=xy;}
}
}
main()
{
memset(sell,0,sizeof(sell)) ;
ReadDat() ;
SortDat() ;
WriteDat() ;
}
void ReadDat()
{
FILE *fp ;
char str[80],ch[11] ;
int i ;
fp = fopen("IN1.DAT","r") ;
for (i = 0 ; i < 100 ; i++)
{
fgets(str,80,fp) ;
memcpy(sell[i].dm,str,4) ;
memcpy(sell[i].mc,str + 4,10) ;
memcpy(ch,str + 14,4) ; ch[4] = 0 ;
sell[i].dj = atoi(ch) ;
memcpy(ch,str +18,5) ; ch[5] = 0 ;
sell[i].sl = atoi(ch) ;
sell[i].je = (long)sell[i].dj * sell[i].sl;
}
fclose(fp) ;
}
void WriteDat()
{
FILE *fp;
int i ;
fp = fopen("OUT1.DAT","w") ;
for(i = 0 ; i < 100 ; i++)
fprintf(fp,"%s %s %4d %5d %10ld\n",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,
sell[i].je) ;
fclose(fp) ;
}

C语言出现for information on how you program can cause an assertion failure#include #include #include #include #include #define MAX 100typedef struct { char dm[5] ; /*产品代码*/char mc[11] ; /*产品名称*/int dj ; /*单价*/int sl ; /*数量
难道没人知道吗?

for information on how your program can cause an assertion failure,see the Visual C++documentation这是我的一个C语言在vc6运行下出现的问题 我想知道原因 麻烦具体一点 我C不好 C语言出现for information on how you program can cause an assertion failure#include #include #include #include #include #define MAX 100typedef struct { char dm[5] ; /*产品代码*/char mc[11] ; /*产品名称*/int dj ; /*单价*/int sl ; /*数量 C语言 for循环体内可不可以出现while语句? C语言,for(;i Please talk to Mr Chen for().A.an informatioPlease talk to Mr Chen for().A.an information.B.some information C.many information D.more information Thank you for giving us _____A:an information B: information C: the information D:the informations选哪个?为什么? win7打印出现“No information is available for this printer”然后打开程序停止工作 for further information search for information是什么意思? for your information asking for information是什么意思 pry for information翻译 For Your Information request for information是什么意思 request for information是什么意思 the information和information的区别--Thanks for giving me ___ I wants.--You are welcome.A.the information B.an information C.the informations D.information为什么不用D,选A? you may ask Mr.Wang for ___about that .A.an information B.informations C.some information D.some informations we can____online for useful information.A.search B.look for C.get D.find