There are cases when you need to define a constant pointer to a variable/object; for instance, when taking a function address, or when you want to protect a pointer from unintended modifications such as assignment of new address, pointer arithmetic, etc. In fact, an objectís this is a constpointer. A constant pointer is declared:

int j = 10;
	int *const cpi = &j; //cpi is a constant pointer to an int
	*cpi = 20; 	//OK, j is assigned a new value
	cpi++; 	//Error; can not change cpi
If youíre confused by the syntax, remember: const defines a constant pointer, whereas a const variable is declared like this:

const int k = 10; //jís value may not be changed
And a const pointer to a const variable:

 int *const cpi = &k; //cpi is a constant pointer to a const int

	*cpi = 20; //Error; kís value cannot be modified
	cpi++; //Error; can not modify a const pointer