| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 640 人关注过本帖
标题:为什么会报错“error C2143: syntax error : missing ']' before ';'”
取消只看楼主 加入收藏
豆饼洋
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2012-9-15
结帖率:0
收藏
已结贴  问题点数:10 回复次数:1 
为什么会报错“error C2143: syntax error : missing ']' before ';'”
错误出现在“double T[n];”这一行,为什么会提示“error C2143: syntax error : missing ']' before ';'”这个错误
double cp[1],k[1];
#define e 7800;
#define h 250;
#define B 0.25;
#define n 20;
double T[n];
    double a[n];
    double b[n];
    double c[n];
    double f[n];

我正在网上看到了类似的程序,为什么这个又没报错呢?

#define LEN 1    //平板长度
#define IMAX 10  
#define H 250   //对流传热系数
#define K 36     //导热系数
#define P 1000  //密度
#define C 4200   //比热容
#define Tf 90    //左端流体温度,设右端温度衡为50度。
double u[IMAX+1];
    double a_array[IMAX+1];
    double d_array[IMAX+1];
    double b_array[IMAX+1];
    double c_array[IMAX+1];
搜索更多相关主题的帖子: before double 传热系数 
2012-09-30 21:28
豆饼洋
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2012-9-15
收藏
得分:0 
类似的程序咋就结果不同呢?
2012-09-30 21:32
快速回复:为什么会报错“error C2143: syntax error : missing ']' before ';'” ...
数据加载中...
 
   



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

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