07-10-2006 11:55 PM
07-11-2006 12:02 AM
07-11-2006 01:10 AM
thanks robert..but i am working in VC++ using LCVI as Front end/user interface..
so wat can i do if i want to split directory from path in VC++ ..
07-11-2006 03:46 AM
You could always try something based on the ANSI function strrchr (). Perhaps:
char *ptr;
if (ptr == strrchr (copy_of_filename, '\\')) // Find the last directory separator
*ptr = 0; // Terminate the string there, if it exists
This will alter copy_of_filename to become just the directory part.
JR
07-11-2006 10:09 AM
I don't see any reason why you can't use the CVI function, you are already importing CVI stuff for the UI, so why not a few more functions if you need them?
The first virtue of the programmer is laziness, reuse code that is already written instead of writing your own.