Hi, maybe this may help: if you want to specify a path like c:\xxx\yyy\zzz.dat then the following code char pathbuf[1024]; sprintf(pathbuf,"c:\xxx\yyy\zzz.dat"); will result in pathbuf==c:xxxyyyzzz.dat simply because \ (a backslash) in C strings is considered to be a special character. E.g. \n - is a newline character. and \\ is a single backslash character. So in order to process the paths properly one has to put c:\\xxx\\yyy\\zzz.dat On UNIX there's no problem since the path separator is a / (forward slash) Cheers Piotr -- ________________________________________________________________ Piotr Adam Zolnierczuk Dept. of Physics and Astronomy http://www.pa.uky.edu/~zolnie University of Kentucky phone: (606) 257-5565 Lexington, KY 40506, USA fax: (606) 323-2846 ________________________________________________________________ written on recycled electrons
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:17 MET