class Thing {

public:
     int Item;
     Thing (int Value);
     Thing (int Value1, int Value2);
     int GetValue1 () const;
     int GetValue2 () const;

private:
     int DataItem1;
     int DataItem2;
     void SetValue1 (int Value);
     void SetValue2 (int Value);
}

<< moderator edit: added [co[u][/u]de][/co[u][/u]de] tags >>


How many member functions does class Thing have?

-Thing (int Value)
-int GetValue1()
-int GetValue2()
-void SetValue1 (int Value)
-void SetValue2 (int Value)

-int DataItem1....this is data member...is it part of member function?

are there more member functions that I missed??

class Thing {

public:
int Item;
Thing (int Value);
Thing (int Value1, int Value2);
int GetValue1 () const;
int GetValue2 () const;

private:
int DataItem1;
int DataItem2;
void SetValue1 (int Value);
void SetValue2 (int Value);
}

Blue represent data members
Red represent member functions

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.