At the moment I am fiddeling with some exeDSP exports. For example this one:
Multimedia::MediaPlayer::Music::CMusic::GetDlnaMediaInfo(char *, Multimedia::_tMediaInfoContext *)
(mangled name: _ZN10Multimedia11MediaPlayer5Music6CMusic16GetDlnaMediaInfoEPcPNS_18_tMediaInfoContextE)
My question is: how can I achieve a class structure like that? Especially the multiple "::"? Any hints?
C++ class construction question
-
- Official SamyGO Developer
- Posts: 111
- Joined: Thu Jun 24, 2010 8:26 am
- Location: Frankfurt, Germany
Re: C++ class construction question
I presented this problem to a colleague of mine, and got the following example:
Code: Select all
#include <iostream>
using namespace std;
namespace WHOOPS
{
class A {
public:
class B
{
public:
class C
{
public:
bool gotIt(void);
};
C c;
};
B b;
};
}
bool WHOOPS::A::B::C::gotIt(void)
{
cout << "I got it!" << endl;
return true;
}
int main(char **argv, int argc)
{
WHOOPS::A a;
a.b.c.gotIt();
return EXIT_SUCCESS;
}
-
- Official SamyGO Developer
- Posts: 111
- Joined: Thu Jun 24, 2010 8:26 am
- Location: Frankfurt, Germany
Re: C++ class construction question
Great! That's it. Thank you and best regards to your colleague...