What I want to do is create a program to prompt the user for input. If they select yes I want to terminate the rest of the program. If they select no I want to immediately run a script. If there is no input for 5 minutes I want the script to automatically run. The only reason I want to use the script or batch file is I previously created it and it is already done.
The problems I am having is I am not sure how to declare the file system and file so it can be called. Then, I am not sure how to call the script to run. I am also not sure how to count down the 5 minutes to auto launch the script when ready. Below is my file in all it's current form.
//Program Name Apex Database Backup
//Written 8/3/2016
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <string>
#include <windows.h>
#include <stdio.h>
using namespace std;
int main()
{
    //Declarations
    bool yes;
    bool no;
    char yesOrno;
    string open;
    FILE *C$;
    //Prompt the User for Input
    cout << "Are You Currently Loading Out? If Not This Program Will Execute in 5 Minutes. " << endl;
    cout << "You Will Lose Your Connection to Apex! " << endl;
    cout << "Enter yes or no: " << endl;
    //Get User Input
    cin >> yesOrno;
    //Open the File
    public FILE *DatabaseBackup.bat fopen(*C$)
        //Process the Selection
            if (no)
            {
                ShellExecute (DatabaseBackup.bat);
            }   
    return 0;
}