To use pthreads, I used as input a char* that was cast to void* as input. If it’s later cast to (char*) it can be printed and used normally ( (char*)var ). However, if one does (char*)var[i], where ‘i’ will help us reference a character, it doesn’t. Why?
e.g. MS says ‘expression must be a pointer to a complete object type’.
Because of operator precedence: the cast comes after the subscript operator.
You have to write
((char*)var)[i];.