Hello everyone, I am an entry level programmer and can make good console based c++ programs.I want to make non-console programs in c++. These can be either graphics, gui, etc. I am confused as to how to improve my C++ skills (mostly due to trying to start many things at one time). I want to be able to create basic GUI windows, mouse and keyboard based events, boxes, buttons, progress bars, etc. For this I am using the Win32 API(using online tutorials)but my progress is slow. And now addressing the big problem. I am looking for entry level C++ programming jobs in my city but cannot find as most of the IT - Software Companies are involved in WebSite Development, and the ones which need C++ programmers, need skills more than just console based programming. So, what kind of skills can I include in c++. What are the different directions or programming paradigms that I can take in c/c++ to move from console based applications? Thankyou, in advance.
I was in the same circumstance a little while ago... Be sure that you understand console programming very well before moving forward. I would suggest writing a few complex text based applications, maybe even a text based rpg before moving forward.
Once you feel confident enough in your console coding though, look up forgers win32 tutorial. This little tut should help you get your foot in the door for working with windows api.
I don't consider graphic interfaces as an improvement. You just create some buttons and hook them to methods/functions.
I could find it interesting if you want to know how the library does that.
Another thing is computer graphics. But only if you study the rendering, transformations, effects, etc.
If you are not interested check out wxWidgets and SFML.
I would suggest writing a few complex text based applications, maybe even a text based rpg before moving forward.
I tend to recommend the exact opposite. Do what is most fun for you. Game libs like SFML make graphical program development very easy. Also, apart for core language skills, there is very little you can take from console development and apply to graphical development, so practicing to death in the console doesn't really do much to prepare you.
Thankyou all, for your quick replies. I really appreciate it. @Roger911, As far as console based programming goes, I can say I have basic required knowledge in it as I can make small useful file handling apps like .csv to .vcf converter etc. which are used for mobile phonebook, and I daily practice in it. In win32 programming, I am already using the FORGERS WIN32 tutorial, and also others. But as I said, my progress is slow. Also, I am making, a small project of 2d games using c++ and opengl. So, is it the right way? Also, I have searched about mfc, windows forms, wtl, qt, etc. which are alternatives to make gui elements in windows. Can you please explain in easy basic language, what are these things? Are they frameworks or libraries(like say opengl)?
I would say, before you start with a game, you should learn about the basics of GUI. Make buttons, labels, panels, flow layout panels, table layout panels and so on. Add events to the objects (click, mouse, timers). Study about moving objects from one panel into another (easy, just take and put) and think, maybe about copy (not easy, recursive deep copy). This knolledge you win, you can always use, also, if somebody would need a simple basic programm. The .Net graphic functions are the same and about other GUIs (GNU): some of them are very similiar. Only: .Net is very slow in some cases. But you can find out, how to do it, that's not slow.
I would suggest writing a few complex text based applications, maybe even a text based rpg before moving forward.
I tend to recommend the exact opposite. Do what is most fun for you. Game libs like SFML make graphical program development very easy. Also, apart for core language skills, there is very little you can take from console development and apply to graphical development, so practicing to death in the console doesn't really do much to prepare you.
I've been told this time and time again too. The thing you have to be careful of though, and I'm guilty of this bad, is getting lost in the library API and not paying attention to the C++ behind it. I think both suggestions have merit. I think that making console applications that do tasks you want to do in a game (like inventory systems) to work out the underlying details then go to graphically doing it. One reason I've not gone far is because I would try making a game and would focus on the graphics and API and hack together the C++ code so I'd have tons of bugs. I've just recently gone back to doing terminal apps to improve me C++ understanding before going to graphical again.
BHXSpecter is right about the library API. It's terrible and compilicated. It's better than the MFC, which I didn't want to learn. I began, to write an own language, but don't have time to finish yet.
Why didn't MS use something like this?
button mybutton
text Press me
pos 100 200
size 200 30
click echo Button pressed
This could also be done in C++ syntax.
I can do this (using .Net API) from C++, from my language, which can use simple batch program syntax or also C like syntax and also from dynamic languages with a C API, currently an interface to squirrel (C/C++ like syntax).
The programming language "lua" I don't like - because I'am used to C/C++ syntax.
But could be, "lua" would be interesting for you, because there exist many bindings to different GUIs and "lua" also has a C/C++ API and can be integrated in C++ applications.
While I highly disagree with this review and agree with the comments on it (they sound more like a consumer than a programmer), they do have the point that people expect to have GUIs of some sort[/url]. The purpose of programming is usually to produce products that consumers will use, and one generally needs some sort of GUI if one is to do so.
The largest hurdle to over come when programming for a GUI is the switch from a program driven flow of execution to a user input event driven flow of execution.
This requires much more planning BEFORE you write code. Your code must be more modular which can lead to run away complexity. As a beginner, the difficulty is that you simple don't know yet all the details that you need to plan out, so the feeling that things are going slow is normal. Pick any framework or library you like, and start simple. If you are truly a good "console mode" programmer, then the skills involved in well designed functions and classes will translate to GUI programming.
I do not think here are different in console or GUI if all you want is to improve your C++ skills. Console can be better choice. As GUI only makes you too learn GUI API and not c++. But if you make good c++ programs (classes) you can use them with console or GUI. Like I am making a calculator class which could be used with console and GUI. In console you need to make text based user interface in c++ but GUI user interface in specific API form.
I again thank you all for your replies. But I still havent got the answer to my question.Like I said, I am progressing in my game project nicely. I am not worried about that. Right now, my main aim is to quickly learn to make something non-console based, something which will take me one step ahead from being an entry-level c++ junior programmer. This is because I am not getting a job at this stage. So, I am learning new things, which will push me a little ahead. For this Ive decided to learn gui programming (to make programs which include button, text, labels, progress bars, etc.), using which I can learn to make simple ui applications like calculator, file searcher, etc. What is bothering me is which of the following is the easiest and quickest way to learn and implement gui (as time is of essence here) - Windows Api, Windows Forms, Windows Presentation Foundation, Windows Template Library, vb.net programming or some external library such as Qt? I do plan to learn more than one of these things but only after Ive gained "fair" knowledge in one.
I tried .Net and looked also for another GUI, which is platform independent and offers similar options as .Net. I think WxWidgets would be not a bad choice. Now I looked at the syntax, and the syntax looks nice, very easy compared with .Net. You could also use some simple GUI, which don't offer much, but then you would have too much restrictions.
I personally like starting at the bottom and working my way up, so I would suggest starting with Windows API...everything else on windows goes on top of this.