argv_arteam Posted March 22, 2011 Posted March 22, 2011 Hello.I have no idea why this code won't compile. I get: error C2440: 'return' : cannot convert from 'char *' to 'const char' error. I compiled it before.Can anyone take a look at the solution and try to fix the problem? It is only few KB is size and project is already created.Thanks in advance!Project.rar
BoRoV Posted March 22, 2011 Posted March 22, 2011 (edited) static const char* FileNameOnly(char* aFileName){ char* pc = strrch r(aFileName, '\\'); if (pc) return (const char*)(pc+1); return (const char*)aFileName;} Edited March 22, 2011 by BoRoV
argv_arteam Posted March 22, 2011 Author Posted March 22, 2011 Thank you. I just didn't see it.Cheers.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now