Console-based to GUI
Jul 27, 2012 at 10:04pm UTC
I have made a console-based calculator in c++ and now I would like to make a GUI for it ( not sure if GUI is the right thing, you know buttons and stuff)
The closest I have gotten to a GUI so far is fiddling around with windows forms,
so how can i achieve this?
Here is the source-code if it matters:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#include <iostream>
#include <string>
int main ()
{
using namespace std;
float num1;
float num2;
cout << "Write your first number(use punctuary for desimals, not comma) :\n" ;
cin >> num1;
cout << "Now write your second number :\n" ;
cin >> num2;
float numm = num1*num2;
float nump = num1+num2;
float nummi = num1-num2;
float nums = num1/num2;
cout << "\n" << num1 << "*" << num2 << "=" ;
cout << numm << "\n \n" ;
cout << num1 << "+" << num2 << "=" ;
cout << nump << "\n \n" ;
cout << num1 << "-" << num2 << "=" ;
cout << nums << "\n \n" ;
cout << num1 << "/" << num2 << "=" ;
cout << nums << "\n \n" ;
cin.get();
cin.get();
}
Jul 27, 2012 at 11:13pm UTC
GUI is totally different from console apps. I think you should stick with the console for a while.
Tho if you insist i would recommend GTK. It's relative easy.
thecplusplusguy on youtube does a pretty good job explaining GTK i think
Wish you best luck.
Jul 28, 2012 at 7:54pm UTC
Thanks, think i will take your advice and stick with console for a while.
Topic archived. No new replies allowed.