#include//it's a way for us to reference an existing varible. #define LOG(x) std::cout << x << std::endl; //void Increment(int* value) //{ // (*value)++; //} void Increment(int& value)//in this way, it's a lot of cleaner and simpler to read. { value++; } int main(void) { int a = 5; //int& ref = a; //ref = 2; //LOG(a); Increment(a); LOG(a); //int b = 8; //int& ref = a; //int& ref = b;//wrong!!! int b = 8; int* ref = &a; *ref = 2;//a = 2 ref = &b; *ref = 1;//b = 1 LOG(a); LOG(b); //int& ref;//wrong!!! std::cin.get(); }



