browse: forums | FAQ
Connecting Tech Pros Worldwide

Hey there! Do you need C / C++ help?

Get answers from our community of C / C++ experts on BYTES! It's free.

how can I delete a file in c++

yinglcs@gmail.com
Guest
 
Posts: n/a
#1: Oct 1 '07
Hi,

I read this article to talk about all file operation in C++.

http://www.cplusplus.com/reference/c...dio/fread.html

Can you please tell me how to delete a file (from the operation
system) in c++?

Thank you.




Victor Bazarov
Guest
 
Posts: n/a
#2: Oct 1 '07

re: how can I delete a file in c++


yinglcs@gmail.com wrote:
Quote:
I read this article to talk about all file operation in C++.
>
http://www.cplusplus.com/reference/c...dio/fread.html
>
Can you please tell me how to delete a file (from the operation
system) in c++?
See 'remove' function.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


BobR
Guest
 
Posts: n/a
#3: Oct 1 '07

re: how can I delete a file in c++



Victor Bazarov wrote in message...
Quote:
yinglcs@gmail.com wrote:
Quote:
I read this article to talk about all file operation in C++.

http://www.cplusplus.com/reference/c...dio/fread.html

Can you please tell me how to delete a file (from the operation
system) in c++?
>
See 'remove' function.
>
std::remove? Example?

--
Bob R
POVrookie


BobR
Guest
 
Posts: n/a
#4: Oct 1 '07

re: how can I delete a file in c++



<yinglcs@gmail.comwrote in message...
Quote:
Hi,
I read this article to talk about all file operation in C++.
>
http://www.cplusplus.com/reference/c...dio/fread.html
>
Can you please tell me how to delete a file (from the operation
system) in c++?
Thank you.
Google for "rm".

--
Bob <GR
POVrookie


Victor Bazarov
Guest
 
Posts: n/a
#5: Oct 1 '07

re: how can I delete a file in c++


BobR wrote:
Quote:
Victor Bazarov wrote in message...
Quote:
>yinglcs@gmail.com wrote:
Quote:
>>I read this article to talk about all file operation in C++.
>>>
>>http://www.cplusplus.com/reference/c...dio/fread.html
>>>
>>Can you please tell me how to delete a file (from the operation
>>system) in c++?
>>
>See 'remove' function.
>>
>
std::remove? Example?
Yes, 'std::remove'. Part of the Standard C library (and C++, by
inclusion). What example do you need? RTFM and write your own.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


osmium
Guest
 
Posts: n/a
#6: Oct 2 '07

re: how can I delete a file in c++


"BobR" writes:
Quote:
<yinglcs@gmail.comwrote in message...
Quote:
>Hi,
>I read this article to talk about all file operation in C++.
>>
>http://www.cplusplus.com/reference/c...dio/fread.html
>>
>Can you please tell me how to delete a file (from the operation
>system) in c++?
>Thank you.
>
Google for "rm".
The *proper*, portable answer has already been given, use remove. Please
don't make suggestions for inferior ways to do things, especially when the
right way is right in front of you..


Closed Thread