摘要:
今天尝试在类中实现结构体,但是在类中对结构体进行声明实现,然后对其进行实现就会报错,例如按照如下的实现方式#include <iostream>using namespace std;class A{public: struct one{ string name; int age; }obj; void shuchu();};void shuchu(){ cout<<"a"<<endl;}int main(){ A a; a.obj = {"chenhongliang",1}; return 0;}这样会编译不过,但该 阅读全文
posted @ 2012-08-20 23:06
SA高处不胜寒
阅读(526)
评论(0)
推荐(0)

浙公网安备 33010602011771号