|Re: [paho-dev] Using C++ with the Paho C client library|
In that case the char* elements of the structure should be defined as const char* as well.
1) char* -> const char*
2) char ** -> char* const* (for reasons as you pointed out: http://pubs.opengroup.org/onlinepubs/009695399/functions/execve.html)
3) structures to be const (opts* becomes const opts*)
4) char* elements of structures to be const char*
Then applying the same principles to callback functions.
Here are reasons not to use const definitions instead of #defines in C:
On 17/05/13 14:30, Frank Pagliughi wrote:
No I wouldn't think to start adding const to specific fields in a structure. Certainly not to indicate which members can be updated by an arbitrary function call.
Back to the top