explicit etc.

M

Michael

Hi
I don't understand this line:
-----
explicit InterfaceQuery(FMSInterfaces iid) : interfaceId(iid),
itsInterface(0) {}
-----
as below. What exactly is that doing?
Many thanks
Michael

---------

enum FMSInterfaces {
FMSSystemInterface,
FMSDatabaseInterface,
FMSPadInterface,
FMSIRSInterface,
FMSPrefInterface
};

struct InterfaceQuery
{
explicit InterfaceQuery(FMSInterfaces iid) : interfaceId(iid),
itsInterface(0) {}

FMSInterfaces interfaceId;
void* itsInterface;
};
 
V

Victor Bazarov

I don't understand this line:

It's a constructor. Please read your favorite C++ book about constructors.
Many thanks
Michael

---------

enum FMSInterfaces {
FMSSystemInterface,
FMSDatabaseInterface,
FMSPadInterface,
FMSIRSInterface,
FMSPrefInterface
};

struct InterfaceQuery
{
explicit InterfaceQuery(FMSInterfaces iid) : interfaceId(iid),
itsInterface(0) {}

FMSInterfaces interfaceId;
void* itsInterface;
};

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,364
Latest member
Stevanida

Latest Threads

Top