user1599559
user1599559

Reputation:

Front end for C++ console program

I am currently in the end stages of development of a console program in C++. The issue I am having is my program requires that the user be able indicate where they want to perform function on a large, dynamic grid (aprox 50x50). The console implementation I have designed is very clunky, and difficult to use. It would also be nice for the user if I had a drop down box or similar functionality for IO.

It was recommended to me that I design the front end in C# or HTML5. I have limited, basic experience with C#, and no experience with HTML5. I am also still relatively new to C++. I would appreciate being pointed in the right direction.

Upvotes: 0

Views: 707

Answers (3)

pmr
pmr

Reputation: 59841

If your program is written in a style like most source code management systems, your front-end can use the system function or process pipelines (alternatively good old popen) to issue commands and deal with them. If you cannot do something like this you can have a look at your code and check out how tied the actual logic is with the representation of things on the command line. If it deeply tied together (e.g. your compute() function pads strings to the correct length for printing), you need to refactor. If it isn't your probably can just build a GUI with any GUI tool-kit on top of the already existing code.

Upvotes: 1

CapelliC
CapelliC

Reputation: 60034

You could use a DataGridView in managed C++, the .NET API it's identical (for practical purpose) among languages. DataGridView exposes a large array of methods/objects, just because it's a very useful/used interface. So you could find it somewhat difficult, but the basic usage can be very simple.

Upvotes: 0

CyberGuy
CyberGuy

Reputation: 2813

I will recommend you simple GUI. Creating GUI in the QT is very easy, there is a lot of basic tutorials. after download and install : http://qt.nokia.com/products/ there is directory called "example".

Other solution for me is another application which will save data in some reasonable format like .xml and there you can load it in your program like ./MyComplicatedApplication MyData.xml

I would not mess up with C#, why two different languages? It will be harder in the maintenance. Be aware that writing GUI in the QT is not really harder than in C# and it will be cross-platform code.

Upvotes: 0

Related Questions