首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

class类怎么定义static类类型啊

2013-09-23 
class类如何定义static类类型啊?class foo{int xint y}class check {static foo otherstatic z} c++

class类如何定义static类类型啊?


class foo{
int x;
int y;
};
class check {
static foo other;
static z;
}; 

c++ primer 4rd十二章的某个习题的简化版,
大概就是这个意思!
哪个 other已经声明了,如何在类外定义啊?
[解决办法]
foo check::other;

热点排行