Posts by Tiago Gomes • 304 points
7 posts
-
1
votes3
answers173
viewsA: Why is it not (easily) possible to hide private members?
Why then, in c++ it is not possible to hide the private data implementation? Why it is necessary to put privates data on headers? This is necessary due to the way C++ organizes objects in memory.…
-
7
votes1
answer572
viewsA: Object-Oriented Multithread in Native C++11?
From the C++11 standard, functionalities related to concurrent programming were introduced. These features can be found in the files: <conditional_variable> <future> <mutex>…
-
0
votes1
answer73
viewsA: Loss of reference per parameter
The guy OrdemDeProducao is created from pointers given to it in the constructor and desaloca these pointers in the destructor. Your specific problem occurs when you copy an object of the type…
-
2
votes1
answer265
viewsA: C++/Arduino Array in class
This problem occurs because variables qualified as static in classes/structures should be defined outside the class besides being declared within it. So somewhere in your cpp file that is associated…
-
3
votes1
answer218
viewsA: C++ Dynamic Pointer Allocation
The direct answer to your question is that you are using ini as the beginning of the list but removing an element does not update its value. As it does not do so you delete the same elements several…
-
1
votes1
answer160
viewsA: Copy Qvector Local to Qvector Class
First, this example code shows some problems in basic concepts of the C++ language (You seem to have a knowledge of the Java language and are using C++ as if it were it). It would be interesting to…
-
1
votes3
answers4604
viewsA: Count characters without empty spaces
If your goal is just to count the different elements of white space, you should take a look at the function std::count_if of the standard algorithm library ( <algorithm> ). With this function…