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 8006795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:37:48+00:00 2026-06-04T17:37:48+00:00

Possible Duplicate: C++: When to use References vs. Pointers Could operator overloading have worked

  • 0

Possible Duplicate:
C++: When to use References vs. Pointers
Could operator overloading have worked without references?

I couldn’t help it, but this fundamental question was on my mind: why does C++ have references when you could do with pointers just as well?

I know that in certain situations they are slightly safer and more often than not they make the code prettier, but technically there is no difference, right? So are there any situations where I couldn’t do with a pointer and a reference is a must?
I would like to see specific examples of when using references is unavoidable.

Disclaimer:
I haven’t found any answers to this on StackOverflow, this is not a question about the differences in syntax. I am wondering why the C++ language introduced references in the first place.

  • 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-04T17:37:50+00:00Added an answer on June 4, 2026 at 5:37 pm

    Operator overloading. Using pointers for “passing via reference” would give you unacceptable syntax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: C++: When to use References vs. Pointers I'm pretty new programmer to
Possible Duplicate: When should I make explicit use of the this pointer? I'm wondering
Possible Duplicate: Self-references in object literal declarations I have an object literal which is
Possible Duplicate: When should you use 'friend' in C++? I have come to a
Possible Duplicate: Self-references in object literal declarations Within a .js file I have an
Possible Duplicate: Java - when to use 'this' keyword Is it generally good convention
Possible Duplicate: Use cases for IdentityHashMap What could be a practical use of the
Possible Duplicate: Why use document.write? Considering the negative effects of document.write(), why are most
Possible Duplicate: When to Use Static Classes in C# Questions in the title..........i would
Possible Duplicate: How to use enable_if to enable member functions based on template parameter

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.