How to create a temporary variable in C++?

I have a function returning a reference to an instance of my class "record". record& get_record(int key) { ...

Return reference to a vector member variable?

I have a vector as member in a class and I want to return a reference to it through a getVector() function, so as to...

Reference member variables as class members?

In my place of work I see this style used extensively:- #include <iostream> using namespace std; class A { ...