Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7158813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:07:42+00:00 2026-05-28T13:07:42+00:00

I have a C++ application that currently has console output. I want to add

  • 0

I have a C++ application that currently has console output.

I want to add a simple web front-end to this application to allow me to view its output remotely.
Eventually, I would like to add some buttons to control the back end application, as well as some charting capabilities to visualize the data.

I’ve looked into Wt, briefly, but it seems like it’s putting too much of the front end in the back end.
I’d like to be able to use the more popular web front ends, like JQuery and MooTools.
Currently I’m using my Windows desktop to prototype, but I’d like the solution to be able to eventually run on Linux, with Apache as the web server.

What is the best way to create the binding between the front and back ends?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:07:43+00:00Added an answer on May 28, 2026 at 1:07 pm

    One quick-and-dirty method i sometimes use is to write a perl cgi wrapper that runs the application and captures it’s output:

    #!/usr/bin/perl
    use warnings;
    use strict;
    use CGI qw(:standard);
    
    print header();
    print "<html><head><title>Example that should get you going</title></head><body>\n\n";
    
    my @output = `/usr/bin/whatever`;
    
    # you'd probably want to parse the output in some way at this point
    
    print @output;
    
    print '</body></html>';
    

    For when you get around to controlling it, you can add a form to the website. Basically, if param() has data in it, use that data to parse a set of switches for the C++ application. If no switches are defined, display a form with a set of checkboxes and buttons that, when submitted, will parse into switches and the application will be launched with them.

    Warning: If you’re parsing form-input into switches, be absolutely 100% sure that it’s parsed in such a way that it can’t be tainted with, for example, a:

    ; rm -rf *
    

    …in the parameters returned from the form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a web application that have about 6-12 pages. On each one
I have a web application that can load plugins through reflection. It currently uses
We have an application that has one or more text console windows that all
I have a PHP application that currently has 5k users and will keep increasing
Currently I have an application that receives an uploaded file from my web application.
I have a server application (singleton, simple .NET console application) that talks to a
I have a long-running console-based application Sender that sends simple text to STDOUT using
I have a long-running console-based application Sender that sends simple text to STDOUT using
We have a console application (currently .NET) that sends out mail in bulk to
I have an application that has a UILabel displaying the current date and time,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.