J
Jens Kleine
Hi, I've been having some problems with system calls.
When I create a simple file like this
int main(int argc, char *argv[])
{
int x;
printf("Checking if processor is available...");
if(system(NULL))
puts ("Ok");
else
exit (1);
x = system("date");
printf("The value returned was: %d.\n", x);
return 0;
}
everything works fine and all the functions I enter are called and executed.
But when I include the same code into a larger programme (this is where I
need to call another function multiple times) system() doesn't execute the
function and just returns some value like 1280 or 32768.
Does anybody know what the problem could be?
Kind regards,
Jens
When I create a simple file like this
int main(int argc, char *argv[])
{
int x;
printf("Checking if processor is available...");
if(system(NULL))
puts ("Ok");
else
exit (1);
x = system("date");
printf("The value returned was: %d.\n", x);
return 0;
}
everything works fine and all the functions I enter are called and executed.
But when I include the same code into a larger programme (this is where I
need to call another function multiple times) system() doesn't execute the
function and just returns some value like 1280 or 32768.
Does anybody know what the problem could be?
Kind regards,
Jens