What is the proper way to initialize unsigned char*? I am currently doing this:
unsigned char* tempBuffer;
tempBuffer = "";
Or should I be using memset(tempBuffer, 0, sizeof(tempBuffer)); ?
For a char [], I can easily get its length by:
char a[] = "aaaaa";
int length = sizeof(a)/sizeof(char); // length=6
However, I cannot do like this to get the length of a char * by:
char *a = new char[10];
int length = …