im a beginner with cpp, and wanted to ask you how to check on application start if the name is "test.exe", if it already is it will just print "yes, this is right", if it's not it will rename it to test.exe
Tried searching for it online, and i could only find a function to rename it ONLY specifying the file name. Es:
int value;
value = rename("fake.exe", "test.exe");
But if people renamed it to something different than fake.exe
it obviously won't work.
EDIT after some answers: Guys, as i said the code works, but only if the name of the file (in this case) is fake.exe, which no one would rename it like that.
So i'm asking to get a part of code that changes the name of the app whatever the name is.