当前位置:编程学习 > 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 © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,