当前位置:编程学习 > VC++ >>

vc++6.0尝试写了个类,出现error C2079: 'b' uses undefined class 'A'

#include<iostream> using namespace std; class A; int main() { A b; cout<<b.data; return 0; } class A { public: int data; A(); }; A::A() { data=0; } error C2079: 'b' uses undefined class 'A' error C2228: left of '.data' must have class/struct/union type 求解!!!
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,