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

  • SEARCH
  • Home
  • 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 645619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:31:23+00:00 2026-05-13T21:31:23+00:00

After reading a description about swapping pointer addresses on Stackoverflow, I have a question

  • 0

After reading a description about swapping pointer addresses on Stackoverflow, I have a question about C++ syntax for references.

If you have a function with the following signature:

void swap(int*& a, int*& b)

What is the meaning of int*& ? Is that the address of a pointer to an integer? And furthermore being that it is a pointer reference, why is it not required for them to be initialized as follows?

void swap(int*& a, int*& b) : a(a), b(b) {}

Here’s the reference question/answer posting (the answer is the point of interest):
Swapping addresses of pointers in c

  • 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-05-13T21:31:23+00:00Added an answer on May 13, 2026 at 9:31 pm

    A reference to an int pointer. This function would be called as follows:

    int* a=...; //points to address FOO
    int* b=...; //points to address BAR
    swap(a,b);
    //a now points to address BAR
    //b now points to address FOO
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading about it for so long, I now have chance to get my
After reading http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicethrottlingbehavior.maxconcurrentsessions.aspx and http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicethrottlingbehavior.maxconcurrentcalls.aspx I have concluded that: MaxConcurrentSessions is the number of
After reading answer to this question: Make "make" default to "make -j 8" I
After reading this question, I need to clear up some things. IQueryable<Customer> custs =
I am learning STL now. I read about set container. I have question when
After reading this description: http://wiki.ecmascript.org/doku.php?id=harmony:weak_maps I'm trying to get a hang of it, but
After reading this description of late static binding (LSB) I see pretty clearly what
So after reading multiple Q&As here about why I should use Jenkins over Hudson,
After reading monkeytalk faq from http://www.gorillalogic.com/testing-tools/monkeytalk/documentation/monkeytalk-faq : How does it all work? MonkeyTalk is
After reading MSDN-XAML Namespaces and MSDN-Understanding XAML Namespaces , I still do not understand

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.