RE: [Dev-C++] ANSI C: How to split path and filename
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2001-06-07 20:37:04
|
Use something like:
#include <string.h>
/* ... */
char s[]=3D"...";
while(strstr(s, "\\")!=3DNULL)
*strstr(s, "\\")=3D'/';
/* ... */
Ioannis
* Ioannis Vranos
* Programming pages: http://members.nbci.com/noicys
* Alternative URL: http://run.to/noicys
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Albert
Vilella Bertran
Sent: Thursday, June 07, 2001 10:51 AM
To: DevC MAILING List
Subject: [Dev-C++] ANSI C: How to split path and filename
Hello,
how do I split my path and my filename?
Example:
c:\things\alfa\myfile.txt
like: char *thepath ----> c:\things\alfa
char *thefile ----> myfile.txt
in ANSI C (or C), meaning the same way with DOS or UNIX
There is anywhere to find this kind of things? (I couldn't find in the
help neither in Bob Stout's snippets)
Thanks.
_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger: Comunicaci=F3n instant=E1nea gratis con tu gente -
http://messenger.yahoo.es
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|