LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-15-2005, 03:06 PM   #1
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: Suse 10
Posts: 206

Rep: Reputation: 30
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
 
Old 02-15-2005, 03:07 PM   #2
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 58
It sounds like fname is a wide character string. It needs to be an ASCII string.
 
Old 02-15-2005, 03:17 PM   #3
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: Suse 10
Posts: 206

Original Poster
Rep: Reputation: 30
fname is a char array (char fname[75]);


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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
erase all the lines of a file Prasun1 Linux - General 9 11-06-2005 10:53 AM
Recent File History: how do you erase it? Yoozer Linux - Newbie 2 09-16-2005 05:34 PM
erase file ust Linux - General 1 03-10-2005 08:46 AM
Is there a way to modify/edit/erase a file in a WinXP partition from within Linux? aixarat Linux - Newbie 8 09-25-2004 11:07 PM
xinetd probleme kemu Linux - Networking 2 08-13-2003 02:14 PM


All times are GMT -5. The time now is 05:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration