S
Senthil
Hi,
I am reading Modern C++ Design where Anderi quoted "C++ does not allow
references to references".
Assume i have
DoThat(const string& strData2)
{
...
}
DoThis(const string& strData)
{
..
DoThat(strData);
}
int main()
{
string Data;
DoThis(Data);
}
Now the strData i have inside DoThis is a reference to Data.The
strData2 I have is a reference to strData.i.e strData2 is a reference
to a reference.
Here Andrei's statement confuses me..Am i missing something?
Thanks,
Senthil
I am reading Modern C++ Design where Anderi quoted "C++ does not allow
references to references".
Assume i have
DoThat(const string& strData2)
{
...
}
DoThis(const string& strData)
{
..
DoThat(strData);
}
int main()
{
string Data;
DoThis(Data);
}
Now the strData i have inside DoThis is a reference to Data.The
strData2 I have is a reference to strData.i.e strData2 is a reference
to a reference.
Here Andrei's statement confuses me..Am i missing something?
Thanks,
Senthil