xmunk ,

In my experience, it's rare to see int& in day to day as a regular old lvalue... it essentially just allows you to alias a variable to another name. It's much more common to see them used in function parameters to leverage pass by reference. In C++ pointers usually aren't particularly useful compared to just passing things by reference since stack variables get auto-gc'd it's the preferred style of frameworks like Qt and is extremely easy to use.

Here's a breakdown if you want more information https://en.cppreference.com/w/cpp/language/reference

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines