Reputation: 79
Can anybody help me with the following code. I have declared one structure inside namespace nad structure contains one function. How can I call fun()
in the code.
namespace aaa {
struct bbb {
void fun();
}
}
Upvotes: 1
Views: 83
Reputation: 14390
fun
is a non-static member function, which means you need an instance of it:
aaa::bbb x;
x.fun();
Upvotes: 1