wshini7316 发表于 2012-2-29 18:03:24

vc下的代码移植到ads中的问题!

如下代码;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedeflongint   Word32   ;
typedefshort int   Word16   ;
typedefshort int   Flag;
#define Copy(x,y,L)\
        do{\
    for (int i = 0; i < L; i++)\
   y = x;\
        }while(0)
static Word16 freq_prev_reset = {
2339, 4679, 7018, 9358, 11698, 14037, 16377, 18717, 21056, 23396
};
static Word16 freq_prev;
int main()
{
short *p;
short *p1;
   p=&freq_prev_reset;
   p1=&freq_prev;
   Copy(p,p1,10);
return 0;   
}
以上代码能在vc下正常运行,但是我将以上功能移植到ads1.2编写的程序中的时候就会出现错误,是什么问题?
页: [1]
查看完整版本: vc下的代码移植到ads中的问题!