RichardUSTC

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年4月26日

摘要: C++支持类的嵌套,其语法比较简单。代码是最好的说明。 1 #include <iostream> 2 using namespace std; 3 4 class Outter{ 5 public: 6 int a; 7 static int s; 8 //nested class and enclosing class are independent. 9 class Inner{ 10 public:11 int b;12 //nested c... 阅读全文
posted @ 2013-04-26 16:42 RichardUSTC 阅读(357) 评论(0) 推荐(0) 编辑