Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 4th, 2006, 11:07 PM   #1
sharadpro
Newbie
 
Join Date: Feb 2006
Location: India
Posts: 25
Rep Power: 0 sharadpro is on a distinguished road
Function to delete / rename a file

rename() and remove() functions are used in C.Pls tell the functions to rename and delete a file in C++!
sharadpro is offline   Reply With Quote
Old Apr 4th, 2006, 11:27 PM   #2
Kaja Fumei
Hobbyist Programmer
 
Join Date: Oct 2005
Posts: 134
Rep Power: 4 Kaja Fumei is on a distinguished road
Actually, there is no C++ specific way. You use the same C functions, except include <cstdio> rather than <stdio.h> and rename() and remove() will be in the "std" namspace.
Kaja Fumei is offline   Reply With Quote
Old Apr 6th, 2006, 8:21 PM   #3
TCStyle
Programmer
 
Join Date: Jan 2005
Location: Albany, NY
Posts: 43
Rep Power: 0 TCStyle is on a distinguished road
Depending on your targeted OS (assuming you are working with windows or linux), you could aways use the system(); function.
__________________
meh...
TCStyle is offline   Reply With Quote
Old Apr 7th, 2006, 9:17 AM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Quote:
Originally Posted by TCStyle
Depending on your targeted OS (assuming you are working with windows or linux), you could aways use the system(); function.
Bad, bad idea. It's open to exploitation, and it's not portable. Go with the functions provided - they're there for a reason.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:11 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC