If you know what std::string is, why then do you opt to use char * in your code? You should know that char* and std::string are NOT the same and as such most operations on std::string cannot be applied to char*. All pointers types only support operator+ together with an integer, so the integer will act as an index into some random positions in memory where the pointer points to. std::string, OTOH, "librarily" supports operator+ with char*, std::string and some other types.
I'd assume you didn't know about std::vector already, so I won't bother suggesting you use it. In that case, you can simply change your code like so: