LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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: openSUSE Tumbleweed
Posts: 209

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: 59
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: openSUSE Tumbleweed
Posts: 209

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


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


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:12 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration