Defining Multiple References

We can define multiple references in a single type definition. Each identifier that is a reference must be preceded by the & symbol:

Example

#include <iostream>

int main() {
    int a = 10;
    int &b = a;
    int &c = a;
    int &d = a;
    int &e = d;
    int &f = e;
    std::cout<<"Before Incrementing\n"<<a;
    std::cout<<"\n"<<b;
    a = 60;
    
    std::cout<<"after Incrementing\n"<<a;
    std::cout<<"\n"<<b;
    std::cout<<"\n"<<c;
    std::cout<<"\n"<<d;
    std::cout<<"\n"<<e;
    
	getchar();
	return 0;
}

Output

Before Incrementing
10
10after Incrementing
60
60
60
60
60