0

I'm trying to create a function that will delete an already saved file. I was hoping std::remove() would do the trick but I don't know the syntax.

Will std::remove() work or should be trying something else...

4
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by mitrmkar
0

Well if you include that function in a header inside namespace std

It will work.

Something like

namespace std
{
remove()
{

//Func goes here
}
}

And save that file, Dont forget to include the file when you try to use that function.

if remove.h is the file

#include <remove.h>
#include <iostream>

int main()
{
std::remove();
}

I guess it would work out if you do this.

0

If you plan to do any serious programming in C++ you absolutely must have a good reference.

How did you learn about the function to begin with if it wasn't with an example or reference?

0

I'm trying to create a function that will delete an already saved file. I was hoping std::remove() would do the trick but I don't know the syntax.

remove()

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.