,Code:class fred
{
char * Buf;
char const *& ConstBuf;
fred ( void );
};
fred::fred(void)
:
Buf ( 0 ),
ConstBuf ( Buf)
{
}
[Text]
1. Buffer and ConstBuf will refer to the same data storage area. ConstBuf read-only and Buffer read-write.
2. I want the more restricted ConstBuf to refer to Buf. and declared in a class.
3 Question: how do I initialize the reference? The compiler complains if I attempt to do so within a class, and it complains when I try to do so in a constructor.
[Text]
T