I am trying to use "spawn" function and/or "system()". I was successfull in running "system()" but I always had to put the child program at a specific location (I do not know how to change path to point to the location of child program). So I then switched to using "spawn()".
I am usig pretty simple arguments and settings and yet I get the error "Invalid Argument " (when I use perror). Please have a look at code below and if someone can tell me why?. I have tried several permuations and referred documentation in VC++ help as well but I can't seem to figure out right now
Note: child program = "test_system.exe"
I hope I have used code tags the right way if not please let me know and I will repost
printf("STart exe file\n");
perror("The message for error\n");
printf("End of exe file\n");