No.108035 作者:liufengzhong 邮件:l_fz@sina.com ID:149522 登陆:12次 文章数:695篇 最后登陆IP:183.13.93.245 最后登陆:2015/6/16 17:02:27 注册:2014/7/29 21:51:15 财富:3671 发帖时间:2014/8/4 14:15:47 发贴者IP:111.221.200.181 标题:liufengzhong:[转帖]如何在XC中使用CLASS? 摘要:No.108035[转帖]如何在XC中使用CLASS? 我创建了一个名为SPI的class,我想做出一个SPI类的class,HANDELS所有的SPI接口。创建工程后,我得到多奇怪的错误。class spi { public: spi(); virtual ~spi(); }; 接下来我得到以下错误:spi.h:24: warning: type defaults to `int' in declaration of `class' spi.h:24: warning: data definition has no type or storage class spi.h:24: error: parse error before "spi" In file included from ../src/main.xc:10: spi.h:24: error: invalid declarator for function declaration spi.h:24: warning: return type defaults to `int' spi.h: In function `spi': spi.h:25: error: `public' undeclared (first use in this function) spi.h:25: error: (Each undeclared identifier is reported only once spi.h:25: error: for each function it appears in.) spi.h:26: error: parse error before ';' token spi.h:27: warning: type defaults to `int' in declaration of `virtual' spi.h:27: warning: data definition has no type or storage cl ......