Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:41:37+00:00 2026-06-07T13:41:37+00:00

Currently learning c++ and nowhere else better to ask something than to the experts

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:41:39+00:00Added an answer on June 7, 2026 at 1:41 pm

    & has two different meanings in this context:

    • placed in a declaration, it means the variable is a reference. In your case, you pass the parameter by reference.

    • outside a declaration, before a variable, it takes its address.

    Besides these, it can also mean the bitwise AND operator

    int x;
    int& y = x;  //y is a reference to x
    int* z = &x; //& takes the address of x and assigns it to z
    y & x;       //bitwise AND
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently learning C#, but I am stuck on something and I can't find
I am currently learning ffmpeg tutorial of Martin Bohme Tutorial Here and I want
Currently learning Spring MVC with Spring 3, I'm trying to find the correct way
I'm currently learning GTK+ via PyGobject and need something like a canvas. I already
I'm currently learning SML and I have a question about something I have no
im currently learning python (in the very begining), so I still have some doubts
im currently learning stacks in java and have a quick question. what will the
I am currently learning backbone.js via a screencast tutorial, somewhere along the way, my
I'm currently learning C and am struggling with how to iterate through an array
I am currently learning Javascript, and I'd like to create my own Lorem Ipsum

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.