N
Nan Li
I just discovered you can have a local class defined inside a function
like this:
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
class A { public: int i; };
A a;
a.i = 5;
cout << a.i << endl;
return 0;
}
But I was wondering what's the possible use of this. Pleae shed some
light.
Thanks,
Nan
like this:
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
class A { public: int i; };
A a;
a.i = 5;
cout << a.i << endl;
return 0;
}
But I was wondering what's the possible use of this. Pleae shed some
light.
Thanks,
Nan