Do I learn STL or QT after c++ basics?

Hi all,

1-I have a basic understanding of c++. I mean I studied c++ basics and I want to learn more about it. I need to learn sth more than c++ basics.
So which one of these do you recommend?
STL, Qt, OpenGL, SDL or what?
I searched Google and Cplusplus forum, but I didn't come to a perfect answer.
Programming just in console is not enough for me.I want to make programs like Winrar or folderlock etc.......
I prefer to learn Qt, so what is your recommendation? Why?
Give me a consecutive chain of C++ based languages to learn like
C++/STL/SDL................
I'm Sorry if this question has been asked before.
2-Does generic Programming means STL?

Thanks in advance
1) I would recommend that you have a strong and working knowledge of the STL before you go onto anything else, it is one of the most important parts of C++. I'd also recommend SFML as a graphics library, or winBGIm for learning if you can find/set it up.

2)No. Generic programming means using templates so that your functions can take arguments of basically any type.

Also STL/SDL/QT are not languages. C++ is a language and STL/SDL/QT are libraries/frameworks.
Learn language first. Standard library is the part of language too.
Then continue with libraries you need/want. If you want graphics, then it depends on what you want:

If you want to create GUI applications, you can use some libraries like:

* QT: http://www.qt.io/
all-purpose library, it has many classes aside from GUI part: networking, image processing, etc. But it requres use of its own precprocessor and in fact it is extension of C++. Completely uncompatible with templates. Still it is not that bad: in the end it all transforms in [hard to read] C++ code. License does not allows static compilation (among other things) in free version.

* WxWidgets: http://www.wxwidgets.org/
all-purpose library like QT. Uses native look on each platform (uses platform-provided primitives) when QT emulates it. Less restrictive license than QT.

* GTK+: http://www.gtk.org/
GUI library. Can be made to look exactly the same on all platform or use platform default look. Is a C library, but has C++ wrapper: http://www.gtkmm.org/en/

* FLTK: http://www.fltk.org/index.php
Lightweight GUI library. Minimalistic. License has a special exception which allows static linking.

* Other multipurpose libraries: SFML, SDL, etc.


If you want to develop 2D games:

* SFML: http://www.sfml-dev.org/
Is a C++ multipurpose library (handles images, sounds, networking). Actually has bad OO, but it is improving gradually, and it is better than nothing and fairly easy to use.

* SDL: https://www.libsdl.org/
Is a C multipurpose library. As it is a C library, expect lots of pointers.


If you want to create 3D applications or to be as close to hardware as possible:

* DirectX and OpenGL are multipurpose media libraries: handles images/3D scenes, sounds, raw input, etc.
They are harder to use, but provide endless possibilities. OpenGL is crossplatform to boot, but DirectX has more features.
Just wondering but what is wrong with the SFML OO?
Insufficient encapsulation: look at *buffers, audio module is main offender. It is like underdeveloped iostreams.
Init functions instead of proper constructors: mostly fixed in current versions.
Insufficient support for move semantics.


Nowadays it become much better, but there is still room for improvement. Not to mention that alternatives (e.g. SDL) commonly are not Object Oriented at all.
Last edited on
It is using C++03 at the moment so move semantics aren't going to be implemented until SFML 3 but if you were to bring this up in the request section of the SFML website I'm sure they could either give reasons or ways to fix it.
Thanks for your replies.
Please recommend a library, STL or QT? or what library after c++ basics?
I want to make programs like Winrar or folderlock or a player etc.......
I said, Learn language first. At least know what it can offer you. So start with standard library (parts of which are commongly known as STL) first.
I want to make programs like Winrar
It is console application mainly and provides more features when used from console. GUI is just wrapper around dll which actually implements compression.
Thanks friends,
God willing i'll start from STL then Qt
Fun fact: STL is the name of a library that heavily inspired the design of the C++ Standard Library. It's a bad habit to refer to the C++ Standard Library as STL, as they are two different things.
I'm extremely pedantic and I disagree with the opinion of those posts. But I'll stop posting now that I know it's controversial.
1- If you have learned C++ basics, move on to C++ intermediate. You might as well have asked: "I just learned to dog-paddle across the pool. What should I do next, cliff diving, pearl diving, wind surfing or para-sailing???"

Your choices indicate you're not ready for any of them. They are all very class-based for instance. Do you understand OOP?

I'm not saying you shouldn't look forward to the future with enthusiasm but you are clearly getting WAY ahead of yourself and unfortunately that usually results in a harsh crash back to reality and a very disillusioned ex-programmer. Furthermore, who the hell are we to give you a sequential list of what to learn. Determine what YOU want to DO first, then figure out the best path to your goal. Only you know what your skills and weaknesses are. What you like and don't like. Did you go on a forum to ask for a list of foods you should eat next? Do you let someone else tell you what to do in your free time? No, they are your choices since you're the only one who knows what you like. Learn a little about everything and make your decision what to pursue. Then go for it by adding skills as you need them. Always have a project or two that stimulates you to add new and more powerful tools to your programming toolbox. Pick projects that keep you interested and excited to get back to coding. Write an app to index your coin (or butterfly) collection, quiz you on a foreign language, whatever keeps you thinking!

2- Don't waste your time (and ours) with questions like these. GOOGLE IT and have the answer in seconds. ;-)
Last edited on
Well, I think we are not quite clear.

First, I asked on this forum to get a better idea "Two heads are better than one".
Here is a cplusplus forum, and i googled it before. So what's wrong if I know your opinions , here is a language forum, it's dedicated to C++ language. I've asked for sequential list of levels. If someone doesn't know the levels of that language and where to begin, may be they start from Qt arbitrarily which will be very difficult for them because they don't know the basics of that language, then they will be confused and get tired with it.



I think we are clear. I'm just saying what you already know. We can only give you our opinions which are based on our abilities and desires. Learning to program in C++ is a huge task which you will never finish (nobody can). There's too much to absorb and it's always being updated and expanded. Learn how to find the info you need when you need it. There is no step-by-step sequence to mastering C++. If you prefer a structured method find yourself a good, standard text and work through it chapter by chapter. Check out Stroustrup first of course:

http://www.stroustrup.com/papers.html

Maybe you can also take some college courses or follow one of the many online tutorials. It's up to you to decide those details. We can only make suggestions.

Again, your enthusiam to advance is great. Keep it up, but don't go jumping into the deep end before you learn how to swim or you'll end up frustrated. Look at the STL contents:

https://www.sgi.com/tech/stl/table_of_contents.html

This isn't another language for you to learn after C++. It's a big library of C++ components you can leverage into your own code so you don't have to keep re-inventing the wheel. Don't waste time studying the whole thing, just know what's in it in case you need it some day. Most of it you will never need.

What about Qt? Here's a list of just its classes!:

http://doc.qt.io/qt-5/classes.html

Each class has dozens of attributes and methods. Again, it's not a language to learn, it's a toolset you can leverage to write your application faster and not have to create your own GUI code the slow, hard way. Take from it what you need and ignore the rest until you need it. Again, most of the classes and methods are pretty esoteric and rarely used by anyone.

I guess the main thing I'm trying to get across is that you don't learn to code by memorizing a bunch of syntax and functions or becoming an expert in a particular library or framework. You learn to code by WRITING CODE. It's an iterative, creative process that builds on itself. Have fun with it and get your feet wet with several of the available tools out there. Then you'll be in a great position to decide what you really want to focus on.
Last edited on
Appreciate your help.
Well done..............
Topic archived. No new replies allowed.