How do I open a terminal window with C++ in Ubuntu?

Posted by Epic Jakelor on Stack Overflow See other posts from Stack Overflow or by Epic Jakelor
Published on 2014-08-25T04:18:33Z Indexed on 2014/08/25 4:19 UTC
Read the original article Hit count: 127

Filed under:
|

I recently decided to start teaching myself C++ and thought a simple encryption project would be a good place to start, since it covers most of the basics (cout, cin, opening files, etc). Is there a way to have the code open a terminal window similar to the one opened when I compile and run from sublime text?

I have tried this so far, but it hasn't changed anything.

    string cmd = "gnome-terminal-x sh-c 'ls-l; exec bash'";
    system(cmd.c_str());

Essentially, I would like to be able to run the program by clicking the .exe, and have the terminal where all of the input and output goes pop up.

© Stack Overflow or respective owner

Related posts about c++

Related posts about ubuntu