I want to have a program that runs ( shown below ) that doesn't show that little black window. ( as a background process ):
What should I do?
Code:
#include <cstdlib> #include <iostream> #include <time.h> using namespace std; void startPro() { system("START C:/PROGRA~1/Yahoo!/Messenger/YahooMessenger.exe"); system("START C:/PROGRA~1/MOZILL~1/firefox.exe"); system("START C:/PROGRA~1/MICROS~2/Office/OUTLOOK.EXE"); } void chkHour() { time_t rawtime; struct tm * timeinfo; char buffer [80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); strftime (buffer,80,"%H",timeinfo); const char * outp = buffer; int hour = atoi(outp); if ( hour > 4 && hour < 13 ) startPro(); } int main(int argc, char *argv[]) { time_t rawtime; struct tm * timeinfo; char buffer [80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); strftime (buffer,80,"%w",timeinfo); const char * outp = buffer; int day = atoi(outp); if ( day > 0 && day < 6 ) chkHour(); return EXIT_SUCCESS; }
Comment