I have a constructor that sets a name and allocates memory for a number of objects of another class -
If I write:
strcpy(name,"NAME");
allocate = new class2(i);
the name of the robot changes, but in the main when i call get_name, only a few of the last chars are printed, or a new string is given with unnusual letters (those with dots above etc)
however, if i would invert the above order, the returned name is what i set it to be