Please consider the code below:
class IMyInterface
{
private:
IMyInterface();
~IMyInterface();
public:
virtual void func1();
virtual void func2(const SerialPortParameters);
virtual int func3(unsigned char *, int bufferSize, int);
};
Is that Ok for declaring an interface in c++? I put the constructor in private section so nobody could create an object from it and all methods are virtual. Is it a standard way of building interfaces in c++?
And It has only a header file. As it is an interface there is no implementation so I think there is no need to create a cpp file. Am I right?
Thanks for your help.