adspace
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Answer Posted / Irshad Ahamad
Yes, you can have a reference as a data member of a class. To initialize it, you should use the initialization list in the constructor's function body instead of the member initializer list within the class declaration.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers