FTP program compiling a c/c++ file

Guys, I'm not so good at network coding. I have a FTP server, client program and thus I can easily transfer files, however what I want is to modify the program such that server receives a c/c++ file, compiles the output, and sends a text file back to the client containing the output. The program should also take note that errors are also transferred. Any help is appreciated. My OS is Ubuntu.
get file, run compiler with received file as a parameter, run resulting program redirecting standard output to a file.

Where do you have problems?
How to run a file using a program?

How to redirect standard output to a file?
I want that all the letters/words the terminal is writing are copied into the new file created, and that file is to be send back to the client.
Last edited on
In windows:
run program:

redirect output:
myProgram.exe > out.txt
My OS is Ubuntu, in it how should I proceed?

My program will get a .c/.cpp file, which is to be executed and the output/errors are printed in out.txt file which is send to the respective client.
Last edited on
Do you have access to the console from your server?
I want to access the console from my server program. Is there any way of doing that? Or I should try something else.
Thanks, Is there a way that I can access the console and copy every letter it's typing into a .txt file?
Topic archived. No new replies allowed.