Questions tagged as 'c++'

1
answer

DoublyLList C ++ // Insert value in position index (with iterator)

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...
asked by 08.03.2016 / 00:52
1
answer

Convert 'const std :: string' to 'std :: string &'

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) {} };...
asked by 09.02.2016 / 20:49
1
answer

How to include the SDL_image lib for my solution in Visual Studio 2015?

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...
asked by 02.12.2015 / 19:05
0
answers

Error Message: malloc: error for object 0x7: pointer being freed was not allocated

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...
asked by 19.01.2016 / 04:49
0
answers

Problem when listing text file data in c ++

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...
asked by 06.11.2015 / 21:35
1
answer

Doubt about functions and classes

class base_token { public: typedef enum { t_invalid_token=0, t_symbol, t_integer, t_literal, t_punctuation, t_keyword } type_of_token; private: type_of_token token_type;...
asked by 04.10.2015 / 23:59
0
answers

Help with Lexicon Analyzer

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...
asked by 25.09.2015 / 03:02
0
answers

How to use boost :: function with function with variable number of parameters?

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 ....
asked by 10.09.2015 / 15:39
1
answer

Call to 'AnsiReplaceStr' is ambiguous

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...
asked by 20.09.2015 / 19:00
1
answer

Problem with Iterator Map C ++ [duplicate]

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...
asked by 20.09.2015 / 09:08