![]() |
Pointer and reference similar at assembly level
Pointer and reference maybe same at assembly level.
Try an experiment : Code: C
Code:
c:\ cl /Fa filename.cppCode:
c:\ gcc -S -masm=intel filename.cppNow you can the code of i, pointer, and reference; Code:
Line 6 |
Re: Pointer and reference similar at assembly level
That's because C doesn't have references like C++. The & is strictly an address-of operator.
|
Re: Pointer and reference similar at assembly level
He is using a cpp file and so the compiler is C++.
|
Re: Pointer and reference similar at assembly level
Quote:
Code:
#include<iostream>Code:
|
Re: Pointer and reference similar at assembly level
the pointer is very ueful when the use in the right way otherwise it can be damaged the our memory location.
|
| All times are GMT +5.5. The time now is 03:06. |