Hi I turned back to C++ after a long time in C#, PHP and other stuff and I found something strange:
temp.name = new char[strlen(name) + strlen(r.name) + 1];
this compiles
temp.name = (char *)malloc(sizeof(char[strlen(name)
+ strlen(r.name) + 1]));
this doesn't (temp.name is a char *)
The compiler error is
error C2540: non-constant expression as array bound
Does anyone know what the problem might be and how it might be remedied? Thank you.