旅途

如果想飞得高,就该把地平线忘掉

数组的定义

 int i=10;
 char tt[i];
E:\MyProjects\111.cpp(21) : error C2057: expected constant expression
E:\MyProjects\111.cpp(21) : error C2466: cannot allocate an array of constant size 0
E:\MyProjects\111.cpp(21) : error C2133: 'tt' : unknown size

const int i=10;
 char tt[i];
OK!!!

posted on 2007-09-04 00:47 旅途 阅读(163) 评论(0)  编辑 收藏 引用 所属分类: C/C++


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理