jweinst1
9/2/2016 - 10:16 PM

intpointer.cpp

#include <iostream>


//address gathering from a pointer
int main() {
	int a = 9;
	int * b = &a;
	std::cout << *b << std::endl;
	//9
	int * c = b;
	std::cout << *b << std::endl;
	//9
	a += 1;
	std::cout << *b << std::endl;
	//10
	std::cout << *c << std::endl;
	//10
}