I am using aide and cppdroid for android to code in c++. I'm having some trouble with the file rename and remove commands. My guess is you can't do this. I have user input and don't know what they will type in so I need a variable or string to input for the path name of the file.
remove("/storage/emulated/0/MyGame/MyHackGame/jni/gameFiles/" + output2 + ".txt");
rename("/storage/emulated/0/MyGame/MyHackGame/jni/gameFiles/temp.txt","/storage/emulated/0/MyGame/MyHackGame/jni/gameFiles/" + output2 + ".txt");
Is the code I used and it has an error. Is there some other way I can write this so I can add the output2 to locate the file?
Error is:
NDK:cannot convert 'std::basic_string' to 'char const*' for argument '1' to 'int remove(char const*)'