Dynamic "array" in C: // Create int *array = (int *)malloc(sizeof(int) * 2); array[0] = 1; array[1] = 2; // Add int *array = (int *)realloc(array, sizeof(int) * 3); array[2] = 3; // Remove array[1] = array[2]; int *array = (int *)ralloc(array, sizeof(int) * 2); // Clear free(array); Dyanmic "array" in C++: // Create std::vector array(2); array[0] = 1; array[1] = 2; // Add array.push_back(3); // Remove array.erase(array.begin() + 1); // Clear array.clear(); /** Concatenate a string to a string. * @param str Pointer to the string * @param str2 String to concatenate * * This might be a bit much when I could use a statically sized array for the string, but this gives me something similar to C++'s string class without using C++. */ static void my_strcat(char **str, const char *str2) { unsigned len = strlen(*str) + 1; if (*str) *str = (char *)srealloc(*str, strlen(str2) + len); else { *str = (char *)smalloc(strlen(str2) + 1); strcpy(*str, ""); } strcat(*str, str2); } // So, in C: (str is a char *) my_strcat(&str, "Zomg"); // In C++: (str is an std::string) str += "Zomg";