Accessing a function in a nested class

How can I access a function in a nested class, like the example below:
1
2
3
4
5
6
7
8
9
class A
{
    class B
    {
         functionB(arg);
    }

    functionA //Needs to access functionB;
}


Do I use something like B::functionB(arg)?
closed account (zb0S216C)
You would use the scope resolution operator (::) if you want to give a nested method a definition, and to access the nested class. To call a method of a nested class, you would have to instantiate B to call B's methods. Like so:

1
2
3
4
// Instantiate B:
A::B NewB;

NewB.Method( );


Wazzak
Okay, thank you sir.
Topic archived. No new replies allowed.