Mike's Notes

Assorted notes

November 19th 2018


const is a keyword to indicate data is read-only.

Declarations involving pointers are often a source of confusion.

int * const myPtr;
const int * myPtr;
int const * myPtr;
const int * const myPtr;

I found this summary of the C right-left rule particularly good as a refresher on how to correctly read the declarations.

tags: programming