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 求解!!!