0
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??

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by jack223
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.