Currently learning c++ and nowhere else better to ask something than to the experts of S.O. I Couldn't find more complete and better answers than here. So there it goes.
DWORD dw = 5;
cout << &dw;
Displays the address where the value of dw
is stored.
But then why:
void Display( DWORD &dwUserId )
{
cout << dwUserId;
}
int _tmain( int argc, _TCHAR* argv[] )
{
DWORD dw = 5;
Display( dw );
}
Why on this example it is displayed the value of dw
and not dw
address?