Thread: SecureOverwrite
View Single Post
Old May 18th, 2006, 3:55 AM   #3
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
In addition to the comments of The Dark, NEVER include module files (*.cpp)

Include <string> for "cerr << Horrors << endl".

I think he got the KillProcess code largely from here. You might want to include that function in your code instead, and modify it so it accepts a filename instead of a process ID.

In C++ try to use C++ strings. When you really need to convert to C strings, you can do so with the c_str() function.

Lastly, As The Dark mentions, the ofstream constructor has default modes of ios::out and ios::trunc, you can change those to whatever you like.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote