How would I delete a file in C++ without using the system("DEL whatever"); ?
Thanks,
Machewy
How would I delete a file in C++ without using the system("DEL whatever"); ?
Thanks,
Machewy
"All things come to an end"
what OS?
Win32 has DeleteFile()
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
One for all Operating Systems
"All things come to an end"
one reason in particular. maybe not in the delete case but in the general file access case. speed trials on the various windows API for file access produce astounding results. I ran c runtime vs WinAPI read and write trials where win32 API runs in 1/4 of the time that the c runtime does. Try it for yourself. Do clock checks after thousands of iterations on reading a file in each method.
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
well then we're in agreement. breath..... slow the heart rate. it's good for you.
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
(in suspicious voice)...Somebody's making a virus!How would I delete a file in C++ without using the system("DEL whatever"); ?
Stan The Man. Beatles fan
When I was a child,
I spoke as a child,
I thought as a child,
I reasoned as a child.
When I became a man,
I put childish ways behind me"
(the holy bible, Paul, in his first letter to the Cor. 13:11)
Uhhhh.... yeah, okay..Originally posted by Stan100
(in suspicious voice)...Somebody's making a virus!
NO! I am not making a virus!
I am making a profile application!
Got it!
Anyways, can you help me find a way to remove files, directories, or whatever?
Does the 'remove()' command work for deleting directories too?
Can you guys find some way to do this?
Thanks so much,
Machewy
P.S. People who make viruses to infect other people's computers are losers!
"All things come to an end"