| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1052 人关注过本帖
标题:求助 c语言结构体赋值 编译报错 syntax error : '{'
取消只看楼主 加入收藏
zhht87
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2013-8-7
结帖率:57.14%
收藏
 问题点数:0 回复次数:2 
求助 c语言结构体赋值 编译报错 syntax error : '{'
如题, 结构体赋值的程序如下,编译的时候提示对con[24]赋值的句子出错  syntax error : '{'   求大神帮助修改
int main()
{
struct convert
 {double C[3][3];};
 struct convert con[24]={{1,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0},{0.0,0.0,-1.0,0.0,-1.0,0.0,-1.0,0.0,0.0},{0.0,0.0,-1.0,0.0,1.0,0.0,1.0,0.0,0.0},{-1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,-1.0},{0.0,0.0,1.0,0.0,1.0,0.0,-1.0,0.0,0.0},{1.0,0.0,0.0,0.0,0.0,-1.0,0.0,1.0,0.0}{1.0,0.0,0.0,0.0,-1.0,0.0,0.0,0.0,-1.0}{1.0,0.0,0.0,0.0,0.0,1.0,0.0,-1.0,0.0},{0.0,-1.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0},{-1.0,0.0,0.0,0.0,-1.0,0.0,0.0,0.0,1.0},{0.0,1.0,0.0,-1.0,0.0,0.0,0.0,0.0,1.0},{0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,0.0},{0.0,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0},{0.0,0.0,-1.0,-1.0,0.0,0.0,0.0,1.0,0.0},{0.0,-1.0,0.0,0.0,0.0,1.0,-1.0,0.0,0.0},{0.0,1.0,0.0,0.0,0.0,-1.0,-1.0,0.0,0.0},{0.0,0.0,-1.0,1.0,0.0,0.0,0.0,-1.0,0.0},{0.0,0.0,1.0,-1.0,0.0,0.0,0.0,-1.0,0.0},{0.0,-1.0,0.0,0.0,0.0,-1.0,1.0,0.0,0.0},{0.0,1.0,0.0,1.0,0.0,0.0,0.0,0.0,-1.0},{-1.0,0.0,0.0,0.0,0.0,1.0,0.0,1.0,0.0},{0.0,0.0,1.0,0.0,-1.0,0.0,1.0,0.0,0.0},{0.0,-1.0,0.0,-1.0,0.0,0.0,0.0,0.0,-1.0},{-1.0,0.0,0.0,0.0,0.0,-1.0,0.0,-1.0,0.0}};
return 0;
}
搜索更多相关主题的帖子: convert double 结构体 c语言 
2013-08-07 18:04
zhht87
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2013-8-7
收藏
得分:0 
回复 2楼 liufashuai
果然通过了,是最后一个元素少了逗号吗?
2013-08-07 18:28
zhht87
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2013-8-7
收藏
得分:0 
回复 4楼 liufashuai
好吧 还在初学阶段 多谢!
2013-08-07 18:34
快速回复:求助 c语言结构体赋值 编译报错 syntax error : '{'
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.031443 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved