CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    32

    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;


    };

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    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.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured