newRPL: [UPDATED April 27-2017] Firmware for testing available for download
|
10-09-2016, 02:53 AM
(This post was last modified: 10-09-2016 02:54 AM by Sylvain Cote.)
Post: #412
|
|||
|
|||
RE: newRPL: [UPDATED September-17-16] Firmware for testing available for download
(10-06-2016 07:27 PM)Claudio L. Wrote: const char const *string = "Hello"; Claudio, The reason the compiler give you a warning is because "const char", "char const" and "const char const" are the same thing. Also, in your hello example, the resulting pointer is not constant. To really have a constant pointer to a constant data you need to use one of the following ... const char * const string = "Hello"; // const char means constant data and * const means constant pointer or char const * const string = "Hello"; // char const means constant data and * const means constant pointer Sylvain |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 16 Guest(s)