laoshanlaodao 发表于 2013-12-8 18:12:40

编译问题请教

#include"hic.h"
typedefunsigned charu8;

section2u8src;
section2u8tgt;

voidcopy(section2 u8*psrc, section2 u8*ptgt,u8length)
//voidcopy( u8*psrc,u8*ptgt, u8length)
{
   u8i;

        for( i=0; i<length; i++ )
        {
          *ptgt = *psrc;
      psrc++;
      ptgt++;
    }
}

voidmain(void)
{
       
        for(;;)
        {
                copy(src, tgt, 10);
    }
}


voidisr(void) interrupt
{
    ;
}

从ichaier网站上下载了编译器,写了这个程序,编译提示:line7:expecting parameter type,请问是什么原因?{:lol:}

laoshanlaodao 发表于 2013-12-21 18:58:34

voidcopy(section2 u8*psrc, section2 u8*ptgt,u8length)
改成:voidcopy(u8length, section2 u8*psrc, section2 u8*ptgt )即可,第一个参数前不能有section{:loveliness:}
页: [1]
查看完整版本: 编译问题请教