how to add copy contructor to this class since the construtor has a void
class Utils {
public:
// Constructor
Utils(void);
// copy Constructor
Utils(const Utils &src);
// Destructor
~Utils(void);
// This method will write two bytes to given destination
void writeTwoBytes(usigned char *desPtr, unsigned short src);
// This method will read two bytes from a given source pointer
ubin16 readTwoBytes(unsigned char *srcPtr);
// This method checks the range
ubin8 rangeCheckingPorts(PTypes eType, unsigned short sourceIpPort,
unsigned short destIpPort);
private:
// This method checks for big endian at run time
int isBigEndian();
// This member variable stores the output of the isBigEndian
int m_bigEndianTest;
};
Re: how to add copy contructor to this class since the construtor has a void
It hardly seems like you need to define a copy constructor or destructor here, since the only member is a single int.....