/ecpp03-const.cpp Secret
Created
July 6, 2016 10:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char * str = "Hello, World!"; // non-const pointer | |
// non-const data | |
const char * p = str; // non-const pointer | |
// const data | |
char const * p = str; // same as above. | |
char * const p = str; // const pointer | |
// non-const data | |
const char * const p = str; // const pointer | |
// const data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment