My function to insert is correct, but I'm having memory leak because when I debugged, temp->prev->prev was pointing to nullptr instead of pointing to the rest of the list when it has 3+ elements.
Note: The 'address' of the...
I have an error and would like tips to solve it
I have my Node struct inside the DLList class:
struct Node
{
Type m_data;
Node *m_next, *m_prev;
Node(Type& v, Node* _prev) : m_data(v), m_prev(_prev), m_next(nullptr) {}
};...
I'm trying to create a game in C ++ with SDL2 for Windows Phone 8.1
I follow this link tutorial and a game with just the project SDL2 / WinRT (no SDL extensions) works fine.
But with that I can just do a few small things like fill the sc...
My program is giving this error message:
malloc: * error for object 0x7: pointer being freed was not
allocated
* set a breakpoint in malloc_error_break to debug
Would anyone know why?
The code is this:
DIR *dir;
struct diren...
Good night everyone,
I have to deliver a job in college, the same is being done in C ++.
As it is the first time that I come across this language, I have a problem in one of the part of the program.
Follows:
In the text file, the dat...
Good evening everyone. I'm doing the implementation of a parsing lexicon in c / c ++, but I'm having a problem outputting. I was asked to leave the program only 3 variables and 2 operands, in addition to 1 delimiter and 1 equality.
But I trie...
In a library I use, a Z queue function expects a pointer to function with the following signature: typedef void (*func)(double, ...) .
I want to write a class in such a way that I can pass an object of this class as parameter to Z ....
After switching RAD Studio XE8 to RAD Studio 10 Seattle, I get the following error:
[bcc64 Error] Unit1.cpp(425): call to 'AnsiReplaceStr' is ambiguous
System.StrUtils.hpp(51): candidate function
System.AnsiStrings.hpp(82): candidate function...
The program for a URI exercise hangs (as in infinite loop) when the input (double) is different from an integer or a decimal number that is not something with a middle (eg 55.5).
I have tried to modify the code in several ways, but it seems th...