I want to move a file(named 'filename'- its a string variable) from Trash folder to recovery folder.
Basically I'm trying to restore files from trash using c++. So if you have any other way to restore files from trash using c++ then also provide the code.
Thanks in advance :D
Like Keskiverto said, you shouldn't be using system() but as far as the issue look closely at your string "mv /home/comp-sl1-25/.local/share/Trash/files/"+filename" /home/comp-sl1-25/RecoveredFile" notice how after filename you are missing a +? Though this won't even fix the issue it will just fix how a string should be.