Page 1 of 1

Run Cpp programs

PostPosted: 14. August 2020 04:42
by rootlosdol7
How do I run .cpp in xampp

Re: Run Cpp programs

PostPosted: 14. August 2020 05:23
by Altrea
You cannot.

Re: Run Cpp programs

PostPosted: 14. August 2020 08:46
by Nobbie
Why not? You cannot run it in base configuration, but you can apply *.cpp as CGI script. Add *.cpp to the CGI AddType Option, find an Cplusplus Interpreter (like Cling) and finally either add a shebang line in the .cpp source or define an appropriate Action for .cpp files in the Apache configuration.

Or, as i dont know if it is really meant to run as source or compiled, compile .cpp into an .exe and apply .exe also as CGI Extension (i did that actually for a C-Program and it worked well).