|
Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006
Pointer & reference
And the reference pointer is used on a trial
------------------------
Int main ()
{
Int val=1024;
Int = &val *&ref
}
This can not be translated
------------------------
So I can be translated into the following two
1.
-------------------------
Int main ()
{
Int val=1024;
Int = &val *pr
Int = pr; *&ref
}
-------------------------
2.
-------------------------
Int main ()
{
Int val=1024;
Int = &val *const &ref
}
-------------------------
Thank you ask why is it so? |
Pointer & reference
This is because int = & *&ref &val the site of the operation with officers to carry out their operation is the result of an interim target. In C + +, not for the temporary use of non-const object invoked, and this is a procedural error in the translation; Const objects for temporary use only, as you have done in the final procedure. |
| |