LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Probleme to erase a file (http://www.linuxquestions.org/questions/programming-9/probleme-to-erase-a-file-290620/)

os2 02-15-2005 03:06 PM

Probleme to erase a file
 
hi

when i try to erase the file:
/opt/good/log/alarm.txt

i got:

Invalid or incomplete multibyte or wide character - not able to delete the file: /opt/good/log/alarm.txt

Code:

if(!remove(fname))
      printf("%s - not able to delete the file: %s\n",strerror (errno),fname))

any idea?

thanks

itsme86 02-15-2005 03:07 PM

It sounds like fname is a wide character string. It needs to be an ASCII string.

os2 02-15-2005 03:17 PM

fname is a char array (char fname[75]);


the value of fname is: /opt/good/log/alarm.txt


All times are GMT -5. The time now is 07:59 PM.