GUI

This is a discussion on GUI within the C++ Programming forums, part of the General Programming Boards category; I was wondering two things: What is a good GUI tutorial Do you think I'm ready to start using GUI ...

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    151

    Question GUI

    I was wondering two things:
    • What is a good GUI tutorial
    • Do you think I'm ready to start using GUI

    Code:
    #include <iostream>
    #include <cmath>
    
    using namespace std;
    
    inline void operations()
    {
    	cout<<"x,/,+,-,^,s2(square root)\n";
    }
    float math()
    {
    	string line;
    	float x;
        float y;
        char a;
    	float answer;
    	int it = 65;
       cout<<"enter an problem (o for operations)";
       getline(cin,line);
       if(line.at(0) == 'o'){
    	   operations();
       }
       else{
    	   cin>>x>>a>>y;
       }
    
       
    	switch (a){
    	case 'o':
    		answer = (char) it;
    	    operations();
    		break;
    	case 's':
    		answer = sqrt (x);
    		break;
    	case 'x':
    		answer = x*y;
    		break;
    	case '/':
    		answer = x/y;
    		break;
    	case '+':
    		answer = x+y;
    		break;
    	case '-':
    		answer = x-y;
    		break;
    	case '^':
    		answer = pow (x,y);
    		break;
    	}
    	return answer;
    }
    int main()
    { 
    	float answer = math();
    
    	cout<< answer <<"\n";
    
    	system("pause");
    }

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    What operating system are you using?

    I'd say you're probably not ready to write GUI code, unless you know what classes are, inheritance, dynamic memory allocation, etc. -- and you've actually used them a little bit. Writing GUIs is hard.

    But if you want to try, I can personally recommend Qt as a good GUI library (especially if you're using Linux). Others have also said good things about wxWidgets. Both of these are cross-platform, open source, and C++. One of them might be a good place to start.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    151
    thank you and i am usng windows 7

  4. #4
    Grey Wizard C_Sparky's Avatar
    Join Date
    Sep 2009
    Posts
    50
    You might want to spend some more time learning C++, get data structures down, those are a big part of GUI.

    Start with wxWidgets on windows, and after a while with that, you might try Win32 or MFC.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. any shareware GUI to use for Windows ?
    By Amy N. in forum C Programming
    Replies: 6
    Last Post: 07-22-2009, 02:31 PM
  2. .NET And GUI Programming :: C++
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 01-27-2002, 04:22 PM
  3. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 03:22 PM
  4. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 08:03 PM
  5. GUI (Graphical User Interface) Help Needed
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-11-2001, 11:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21