Xcode error: conflicting types for 'XXXX'

问题描述:在main方法中调用了一个写在main方法后面的方法,比如:

void main(){
      A();
}

void A(){
}

Xcode编译后就报错:conflicting types for 'A'

 

解决方法:在main方法前面加上A方法的声明,KO!

void A();

void main(){
      A();
}

void A(){
}

 

 

---------------------------------》》》》

 

posted @ 2015-11-24 23:11  KeenLeung  阅读(1432)  评论(0)    收藏  举报