Tagged Questions
0
votes
3answers
139 views
Two-Dimensional vector in C++ – inefficient with dynamic-sized sub vectors?
I know that std::vector uses a contiguous block of memory, but I often see people use vectors of vectors, even when they modify the number of elements in these vectors contained within an outer ...
6
votes
3answers
349 views
QT-C++ vs Generic C++ and STL
Been brushing up on my C++ lately, on Ubuntu QQ. I love the Qt framework for everything, especially building GUI's. I became quite familiar with it when using PyQt over the last few years.
When ...
5
votes
4answers
521 views
What is the point of using lists over vectors, in C++?
I've run 3 different experiments involving C++ lists and vectors.
Those with vectors proved more efficient, even when a lot of insertions in the middle were involved.
Hence the question: in which ...
4
votes
1answer
204 views
How does a priority_queue maintain a heap on a deque efficiently?
In the C++ STL, priority_queue (heap) can be used with any underlying container, such as a deque. How does the implementation stay O(log n) if deques don't swap an item in index a with index b in ...
7
votes
5answers
1k views
Is it practical to abandon STL in C++ development?
I know in some areas (game industry, for example), STL is not recommended.
So my question is: is it really a good practice not to use STL in some cases? If so, what's the biggest reasons of not using ...
1
vote
4answers
2k views
What sorting algorithm does STL use?
I recently started using <vector.h> library and I was wondering, since all the operations are already implemented, IF the method of the sorting algorithm is the most efficient one. Everything ...
2
votes
4answers
261 views
What kind of interface should a double container offer?
I want to write a class which offers two sequences of elements to its users. The first one (lets call it "primary") is the main of the class and will be use 80% of the time. The second one (lets call ...
1
vote
4answers
214 views
Use the terms “vector” or “array” in high level discussion of C++ code
When I write high-level documentation about what an algorithm does, I use the term "array" to refer to the data structure on which the algorithm operates even though the actual data structure is an ...
6
votes
3answers
771 views
Recommendations for C++ refresh? [closed]
As a seasoned C programmer, with some experience of C++ from way back (1990s), I've decided I'd like to get back up to speed with C++ again. Of course a lot has changed in the last 15 years or so ...