Topic: NOMENCLATURE


Author: adam.clarke@toronto.can.ipguild.org
Date: Thu, 12 May 94 01:32:48 -0500
Raw View
I wanted to use a reference to an object as a member of an object, but a
reference has to be assigned at declaration, to get around this I have
used the following:

class A
    {
    };

class B
    {
private:
    A &foo; // ref to a class of type A

public:
    B(A &bar):foo(bar) {};
    };

Is there a name or notation for the type of constuction of class B.
I have also seen it used as follows:

class foo
    {
private:
    short s;
    int i;
    long l;

public:
    foo(short A, int B, long C) : s(A), i(B), l(C) {};
    };

Thanking in advance for all replies.


---
     WinQwk 1.30 #0     Unregistered Evaluation Copy