My last function is not working. This function appends a literal string to a C string. It checks if there is enough space in the C string to append the literal string to it. If there is not enough space, the C string length must be expanded to twice the size of the (literal string length + C string length). Then it can append the literal string to the C string. After I run the program and enter a text string, the first output statement is displayed but after that I keep getting an error of "terminate called after throwing an instance of std::bad_alloc" and the program crashes. All the other functions work before this last append function. Is there a way to fix the last function to work?