Hello..
My system lately's been restarting a lot and hence I'm missing out on my wonderfully scheduled night UL downloads.. so I wrote this c++ code that i want to run on start up..
It basically checks the time and then runs a batch file accordingly..
The only problem is that i'm unable to get the system() function to work properly.. I get a -1 error code..
here is a snippet..
This is the test code, In the end I just want to call a batch file that has the connect and open Utorrent, Dl manager...
what am i doing wrong?? tks!
My system lately's been restarting a lot and hence I'm missing out on my wonderfully scheduled night UL downloads.. so I wrote this c++ code that i want to run on start up..
It basically checks the time and then runs a batch file accordingly..
The only problem is that i'm unable to get the system() function to work properly.. I get a -1 error code..
here is a snippet..
Code:
# include<iostream.h>
# include<stdlib.h>
int callprog()
{
int error;
error = system("C:\\windows\\system32\\notepad.exe");
cout<<"any errors? "<<error<<endl;
return (0);
}
This is the test code, In the end I just want to call a batch file that has the connect and open Utorrent, Dl manager...
what am i doing wrong?? tks!