![]() |
|
#3
|
|||
|
|||
|
Just some small remarks regarding your program.
It seems that it can not handle well an extension of 1 or 2 characters or more than 3 characters. You should start from the back of the file name (argv[1]) and search for the last point '.' character. And BTW, you don't need to use strcat in case you have at least 3 characters for extension. Just find the last '.' in the name and replace the next 4 characters with "BAK" and '\0'. The other remarks from piccolo also remain. |
|
|