#c++ string question
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
you dont have the <string> header
so if I add #include <string.h> does it work?
ok
in the problem it gives me a hint to make an empty string and add the strings in the front. how do I add strings to the front of another string?
thats easy
oh do I do that replace string?
ok
STRING.append("");
can I use this one to add to the front?
like I didin't learn that much and the problems require to use the codes that they teached.
ok
ask chatgpt
ok thx
its better than you think
don't suggest chatGPT
best way to know is to try it out
ok
. chatGPT is merely a tool, not a teacher, yes. but when you have no idea how to do something, you can ask it and find out
You can do this:
emtystring = name + emtystring
or this:
emtystring.insert(0, name);
you will need
#include <string>```for the second option
ok thx