Ok I know the basics of ofstream and ifstream but it seems as if every tutorial on it leaves this out. How do I delete files in c++ console app. Reason? I want to use a temporary file in my app for transferring betting two programs that open and to delete the file when done. Everything but that is done.

Your code should look something like this:

#include <cstdlib>
#include <iostream>
#include <stdio.h>

using namespace std;

int main(int argc, char *argv[])
{
    if( remove("Your File") != 0 )
       perror("File Deletion Failed");
    else
       puts("File Deletion Completed");
  return 0;
}
    system("PAUSE");
    return EXIT_SUCCESS;
}

Hope this helps!

-Chris