Why would you want to make two seperate programs when you can include the math program within the main.exe? Use a switch case to determine what "program" you want to run, such as;
Code:
#include <cmath>
#include <conio.h>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(){
int number;
double a, b, c, again;
again = 1;
while(again == 1){
cout<<"enter 1 for math, 2 for misc, 3 for whatever" << endl;
cin>> number;
//this is where it decides what case to go to
switch(number){
case 1:
a = b + c; //whatever a, b, and c might be
cout<< a << endl;
case 2:;
//put second math function here
case 3:;
//third math thingy
}
//loops it around, this is just a simple loop/restart
cout<<"Try again? (1 for yes, 0 for no)" << endl;
cin>> again;
}
while(!_kbhit());
}
this ends up printing some bogus numbers cause I did not tell it what a, b, and c were, but you get the idea. To keep a program open, loop it around. while, for, and do-while loops will all do the job.