readInput(ElemType *&a)

来源:互联网 发布:mysql 缓存 编辑:程序博客网 时间:2024/05/17 22:18
int readInput(ElemType *&a){int length,n;FILE*input;input = fopen("input.txt","r");fscanf(input,"%d",&length);a = (int *)malloc( sizeof(int)*length );for(n=0;n<length;++n)fscanf(input,"%d",a+n);return length;}

0 0