Pointer

Here are examples about how you can declare pointer in the programming language C++:


char* p;             //p is a pointer to char
char const* p;       //p is a pointer to const char
const char* p;       //p is a pointer to const char
char* const p;       //p is a const pointer to char
char const* const p; //p is a const pointer to const char
const char* const p; //p is a const pointer to const char

It might look strange by first reading :)

If you want to read more about pointers I refer you to a A Tutorial on Pointers and Arrays in C.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>