![]() |
|
#1
|
|||
|
|||
Initialising a Reference variable present in a classHi All,
As far as i know we have to initialise a reference when we declare it. But, how can we initialise a variable that is present as a member of a class ? Can any one help to solve this problem ? Thanks and Regards Vikram |
|
#2
|
|||
|
|||
Re: Initialising a Reference variable present in a classDo you know what a class constructor is? This is the method that fires when your class is created. That is the best place to put initialization routines in. For example:
CPP / C++ / C Code:
|
|
#3
|
|||
|
|||
Re: Initialising a Reference variable present in a classHi ,
Oops sorry there was a mistake in the question . What i wanted to know is how to initialise a Reference variable present as a member variable in the class. whether it is right to have a reference variable as a member variable in the class or not ? Thanks and Regards Vikram |
|
#4
|
|||
|
|||
Re: Initialising a Reference variable present in a classQuote:
Quote:
How about giving an example of exactly what you want to do and what you don't understand about it? Be specific. Regards, Dave Last edited by davekw7x : 16-May-2008 at 08:29.
|
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 10:13 |
| Hard drive/CPU Diagnoses Issues | binarybug | Computer Hardware Forum | 1 | 22-Jan-2007 19:23 |
| Message Class | TransformedBG | C++ Forum | 5 | 29-Nov-2006 21:28 |
| C++ class -- Please help | vnca_1 | C++ Forum | 3 | 14-Jun-2006 12:31 |
| a tester class and then some. | postage | Java Forum | 1 | 06-May-2006 15:48 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The