why does this have an exception in VC++ 2008 Express:
#include <conio.h>
#include <iostream>
using namespace std;
class A
{
private:
int a;
class B
{
public:
void f();
};
public:
B b;
//A(){} // default constructor
class C
{
public:
int a;
};
B g(B);
};
void A::B::f()
{
cout<< "A::B::f()" "\n";
// cout<< a; // error
}
A::B A::g(B c)
{
cout<< "g called" "\n";
B ret;
return ret;
}
int main()
{
// A::B b; // error
A::C c = {33333};
cout<< c.a << "\n";
A a;
a.g(a.b);
_getch();
}