I am writing a command line application in C and inside the program, I would like to call other applications from the command line. For example (and just as a clear example!), Let's say I would like to write a C application that calls the java compiler. First, how would I do this? Is there a C function that directly calls the command line? Secondly, how can I take the plain text output that the java compiler displays and display it through the c program?
I'm sorry if this sounds a little crazy, but I'm very new to C, and I've never done anything like this before. I would like to start writing a few of these utility-style apps. If that matters, I am currently running Windows, but if possible I prefer a platform-independent method, as I use Linux from time to time.
source
share