Posts by Arthur Passos • 74 points
6 posts
-
0
votes2
answers205
viewsA: How to store data from a struct in a vector (c++)
I didn’t try to play, but if I had to kick, I’d say you’re setting clientele-in the header. This way, every time you include.hpp functions, a new definition of clientes_ is generated and "multiple…
-
2
votes1
answer32
viewsA: How to write a variable Std::vector<Std::tuple<>> into a txt file?
One of the things that needs to be done is to define the << operator for the type you want to play in the stream. In your case, the << operator for Std::tuple needs to be defined.…
-
0
votes2
answers58
viewsA: How to return different structures in a function with a value defined in Runtime?
I could not find the use for this, but you can receive by template the architecture you want to use. Link to an example: https://godbolt.org/z/MKWTcV. #include <cstdint> struct s_arch_x86 {…
-
0
votes2
answers514
viewsA: Pass class object as constructor parameter in C++
The Person class builder is "wrong". The way it is written, it tries to call the default constructor of the Data class, and only after, tries to copy the parameter d to the date member. Since there…
-
0
votes1
answer215
viewsA: How to implement the strcpy function without using the c++ <string> library?
The documentation says that the strcpy function does the following: Copies the Character string pointed to by src, including the null Terminator, to the Character array Whose first element is…
c++answered Arthur Passos 74 -
0
votes1
answer4711
viewsA: Giving Segmentation Failure error (recorded core image)
Good afternoon, "Debugging" your code I noticed a silly error in a loop within the interseccal procedure where you switched the comparison variable from "J" to "I" by mistake. Follow the corrected…
canswered Arthur Passos 74