I am working on a function that should construct a long string full of regular characters and numbers separated by white space. My problem is with adding an integer to the string as a character. I've tried to use strcat because it is the only way I know how, but to no avail. Searching hasn't turned up much, and what I have found hasn't made sense to me. Here's a sample of what I am trying:
'*list' is a pointer to the string, '*finder' is a pointer to a structure containing 'char title' and 'int value', both filled with a usable string or integers. It works without the third strcat, so I know that's where the problem is.Code:strcat(*list, finder->title); strcat(*list, " "); strcat(*list, (char)finder->value);
How can I add an integer (converted into a char) onto the end of a string?