Tuesday, July 14, 2009

C++ doubt Please?

i am starting to program in c++ but i dont understand one thing. The code is for making the program work, but how do i make the user interface. I mean in a software you have a buttons, textareas,, etc and all that interacts with the code. But how do i make that?





With Visual Basic?





But i think Visual Basic is another language, you cannot work with c++, isnt it?





And the last question is it the same programming in a windows pc or in Mac.





Thank a lot

C++ doubt Please?
Ok, first off, the user interface you can either design yourself with much more advanced programming techniques or you can use a program that works within the API of your operating system such as the visual studio set, the visual studio set has objects pre-created for you so you DON'T have you code them yourself, you simply code what they do.





C++ syntax is NOT compatible with visual basic, although in the visual studio set you can use visual C++.





To answer your last question, yes and no. The same concepts and (probably) most of the same syntax will work on a pc computer as well as a mac computer, the problem that you will run into is there are certain library's of code that are only available on the PC that are simply not on the MAC (or vice versa) so you may be required to code some of your own classes for objects yourself.
Reply:If you are programming for windows only make your life easy and go to Microsoft's site and download VB 2005 express for free.





You can create a working program GUI and all within a few hours.





C++ like other languages has better uses for lower level program.





but I don't want to get into a language war.





VB 2005 Express is the way to go
Reply:It seems, you want to create GUI in your code, without using any "resources". You can do it using win32 API (though i do not recommend it) or in your C++ code using fox-toolkit.org portable library or Qt, wxWidgets, etc...
Reply:It depends which programming interface you are using. For example, if you are using Microsoft Visual C++ which is similar to Visual Basic for creating your user interfaces.





If you are programming at a command screen and compiling your programs with gcc it would be more difficult to learn how to create these fancy menus and such.





Learning all these programming techniques is fairly complicated and too long for a post here. I would recommend getting a good book on Visual C++ (if that's what your using) since most programming books cover that topic.





Programming on a Mac and PC are different. You can use the same language like C++, C, Java, etc... But you need different compilers, and some specialized programming techniques may be different.
Reply:Standard C++ does not have GUIs like windowing and buttons and stuff; but each framework that ever existed slapping their own framework within their own products. It is not related to Visual Basic; the first programming product that integrated interface as a standard programming construct is Java, before that, all languages link up with sort of a stub containing interface element like in Visual C++.





Visual Basic is unrelated, incompatible, philosophically different, VB is a RAD tool not just a language.





Standard C++ is same across Windows, Mac, Linux; but remember interface programming is not part of standard.
Reply:Try Visual C++


No comments:

Post a Comment