Monday, January 9, 2017
why declare a pointer of type char instead of a variable in C++?
char *variable = "Some string here"; Is it declaring a pointer to type char instead of variable of type char, because the char datatype in C has a size of one byte, and more memory needs to be allocated than a char variable allows? The pointer is actually to an array of type char? http://stackoverflow.com/questions/4826481/c-char-vs-string