0

Someone can tell me what is the use of const unsigned char *?

I'm learning and I wanna now how use const unsigned char * and const char*

28th Sep 2018, 1:43 AM
KENSTEIN
KENSTEIN - avatar
2 odpowiedzi
+ 9
unsigned - it cannot have negative values const - constant, you cannot change its value after assigning * - pointer
28th Sep 2018, 2:02 AM
Aleksander Szczepura
Aleksander Szczepura - avatar
0
const char* is useful for pointer to a string that will not change. ie your program will print some string, like the same welcome messages every time it starts. The unsigned version is useful for pointer to a binary sequence you may want to write too a file.
28th Sep 2018, 12:40 PM
Jared Bird
Jared Bird - avatar