Posts by Eder Matheus • 121 points
6 posts
-
6
votes3
answers844
viewsQ: Sorting of object vectors
I am making an application that sorts an object vector. These objects are Cartesian points, defined in the following class: class CartesianPoint { private: int x; // Coordinate X of a pin or a wire…
-
1
votes1
answer1204
viewsQ: Rand() function does not return random numbers. C++
I have a function that needs to generate, in a specific part, a random number to do a certain task. But whenever the program enters this function, the generated number does not change, always being…
-
0
votes1
answer49
viewsQ: Deck(C++): Abort Trap 6
I’m trying to call a function I’ve done, but always this error appears: libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: deque EXECUTAR FINISHED; Abort trap: 6; tempo…
-
0
votes2
answers108
viewsQ: (C++) Deck: Differences between position access types
I am implementing the Backpack Problem with Dynamic Programming in C++ and chose the deck to build my list. Studying on it, I noticed these two different ways to access a specific position of the…
-
0
votes1
answer79
viewsQ: "Undefined Symbols" error when compiling project
I am trying to compile a project in C++, but it is giving the following error: Undefined symbols for architecture x86_64: "knapSack(int, int*, int*, int)", referenced from: _main in main-b722ae.o…
-
4
votes2
answers137
viewsQ: Is it possible that a class attribute is the class itself?
I’m starting to learn C++ Object oriented, and I have to make an algorithm using chained lists. In C, I used a structure that had as one of the attributes a pointer to the structure itself. I wonder…