请C高手帮我调个小程序
程序如下:
程序如下:
#include <stdio.h>
#include <malloc.h>
main()
{
long int i,n=72000;
float fudianku,*pointerr=&fudianku;
FILE*fp1=fopen("D:\\1.dat","r");
FILE*fp2=fopen("D:\\2.dat","w");
float *p=(float*)malloc(72000*sizeof(float));
clrscr();
if (p==NULL)
{
printf("pnot enough memory\n");
/*exit(1);*/
}
printf("ffff\n");
if (fp1==NULL) printf("cannot find the file\n");
for (i=0;i <n;i++)
{
fscanf(fp1,"%f",&p[i]);
}
for (i=0;i <n;i++)
{
fprintf(fp2,"%f\n",p[i]);
}
printf("%f\n",p[0]);
fclose(fp1);
fclose(fp2);
free (p);
while(!getch());
}
有两个问题:一是我运行一下,出来了结果,我再运行一下,却说not enough memory;二是在1.dat中有一列数据共7
相关问答:
#include "stdio.h"
int main()
{
char *ch(char *, char *);
char str1[]="I am glad to meet you!";
char str2[]="Welcom to study C!";
&nb ......
#include"stdio.h"
#include"stdlib.h"
void ContrTwo(char i)
{
char str1[8];
itoa(i,str1,2);
printf("%s",str1);
}
unsigned char leftRot(char str,int i);
unsign ......
SHIFT加F10与那个键右ctrl边上的那个键功能一样,想屏这个
但不知要怎么写那个组合键!
有没哪个大侠放一段这个的代码或写一段
http://topic.csdn.net/u/20090609/15/7dc9fb70-243f-4070-9cfd-34e48b66e6c6.html
......
两个文件1.PC,1.inc
1.PC有操作oracle数据库的 ,1.inc也有操作oracle数据库
在其他数据中如informix 中$include 1.inc就可以使用了
在ORACLE数据库重 $include 1.inc不可用 EXEC SQL include 1.inc也不可 ......