![]() |
|
#1
|
|||
|
|||
How many member functions within Thing class?CPP / C++ / C Code:
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
|
|||||
|
|||||
Re: How many member functions within Thing class?Constructors are also member functions.
Quote:
Quote:
I hope you know the difference between a function and a variable. Quote:
Thing (int Value1, int Value2); Hence the total member functions are: Quote:
Quote:
Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#3
|
|||
|
|||
Re: How many member functions within Thing class?so in this case, constructors are: Thing (int Value), and Thing (int Vlaue1, int Value2)...is that right?
|
|
#4
|
||||
|
||||
Re: How many member functions within Thing class?Yes.
Do you know the difference between them? One constructor uses only one argument. The other uses two arguments. This is called overloading. Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#5
|
|||
|
|||
Re: How many member functions within Thing class?Thanks Paramesh.
|
Recent GIDBlog
Developing GUIs with wxPython (Part 2) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| templated object as member data in a class? | jfritz | C++ Forum | 2 | 03-Aug-2005 03:33 |
| GIMcontacts - a gim fltk fluid venture | cable_guy_67 | FLTK Forum | 0 | 14-Feb-2005 14:18 |
| Error C2146: syntax error : missing ',' before identifier 'C4' | mattchew008 | C++ Forum | 2 | 19-Dec-2004 06:06 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The