All pastes #511688 Raw Edit

Anonymous

public text v1 · immutable
#511688 ·published 2007-05-26 16:08 UTC
rendered paste body
#include <iostream>
#include <string>

typedef unsigned int UINT;

int main(int argc, char** argv) {
	// create object
	const char c = 'a';
	
	// bind pointer to adress of object
	const char* cp = &c;
	
	// another pointer to bind to this pointer: pchain
	const char** pchain = &cp;
	
	// how far can we get :)
	const char*** masterptr = &pchain;
	
	// yep im pervert
	const char**** god = &masterptr;
	
	// dereference pointer to get object
	std::cout << *cp << " adress is: " << &cp << "\n";
	
	// what does this make?
	bool expr = true;
	UINT loops = 0;
	
	while(expr) {
	++cp; ++loops;
		if(loops > 18) expr = false;
	}
	
	std::cout << ****god << " now adress is: " << &cp << "\n\n";
	
	std::cout << "this is the object itself: " << c << "\n\n"<< std::flush;
}