I have an application that uses a gui to do most of its interface with the user. However I would like to have a separate terminal window that I can write to for some error checking, raw values etc.
I know I can spawn a new terminal with the system()
command but I have no idea if interaction is possible.
in the best possible scenario I would like to have a function which takes a string(char array I know...), and prints it to the newly spawned console window:
something like:
int func(char *msg) {
static // initiate some static interface with a newly spawned terminal window.
// check if interface is still valid
// send data to terminal
return 0; //succes
}