Doubts about STL libraries
I'm learning c++ and I have a great confusion about standar libraries.
Why QT creator does not provide help about it ? (It is not neccesary to answer to this...)
I dont understand why I must to use std::----- . What is std ? is there more 'workspaces' ( I dont know how to name it) ?
I have found a good reference here, http://www.cplusplus.com/reference/string/, anybody knows other ? A way to get help for inline help into QT Creator ?
Thanks
Moved to general
Re: Doubts about STL libraries
Qt Creator doesn't come with STL documentation because Qt has some "replacement" for the STL's containers, iterators and algorithm.
Like you can use (and it's recommended to use) QString instead std::string or std::wstring.
std is the name of the namespace which contains the standard library so that if you have your own class named <for example> string, you don't need to change your class name, because it won't conflict with the standard library std::string (unless you are using namespace std; //thats way it is not recommended to use the std namespace )
I think that knowing STL will help you better understand Qt (especially containers-iterator-algorithm), but it is not necessary to know STL for Qt development;
if you learned STL in Qt you can do one confusion which i did a lot: QList is not a linkedlist like std::list, qt has QLinkedList
Re: Doubts about STL libraries
Quote:
Originally Posted by
tonnot
Why QT creator does not provide help about it ? (It is not neccesary to answer to this...)
As you said yourself STL is a standard library, it's not part of Qt. If you deploy help for STL in Creator, it will use it and give you proper reference.
Quote:
I dont understand why I must to use std::----- . What is std ? is there more 'workspaces' ( I dont know how to name it) ?
These are so called "namespaces". Thanks to that if there is a std::string class, it doesn't conflict with a string class from some other library. You don't have to use std:: prefix, you can declare that you are "using namespace std;" and all symbols from the std namespace will be made available in the default namespace. But then you might get some naming conflicts if you use other libraries.
Quote:
A way to get help for inline help into QT Creator ?
This has already been answered somewhere on this forum.