导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→发表看法:[liufengzhong][转帖]如何在XC中使用CLASS?



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 ......

>>返回讨论的主题


  发表回复
用户名   *您没有注册?
密码   *
验证码   * .
标题   *
心情
随便说说    我回答你    最新发现    得意的笑   
气死我了    真是没劲    坚决同意    表示反对   
大家过来    好奇怪哟    懒得理它    大家小心   
文件上传
内容


字体:      字体大小:    颜色:
粗体 斜体 下划线 居中 超级连接 Email连接 图片 Flash图片 Shockwave文件 realplay视频文件 Media Player视频文件 QuickTime视频文件 引用 飞行字 移动字 发光字 阴影字 查看更多的心情图标 背景音乐
点击加入表情
                         
选项
有回复时用短消息通知您?

   




老古网执行:31毫秒 最大:7276毫秒 查询6次