Jump to content
Tuts 4 You

[C++] char Error


argv_arteam

Recommended Posts

argv_arteam
Posted

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

Posted (edited)

static const char* FileNameOnly(char* aFileName)
{
char* pc = strrch r(aFileName, '\\');
if (pc)
return (const char*)(pc+1);
return (const char*)aFileName;
}
Edited by BoRoV
argv_arteam
Posted

Thank you. I just didn't see it.

Cheers.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...