Questions tagged as 'c++'

3
answers

Identify a specific word in a C ++ String, is there any function ready for it? Or just the nail itself?

Hello, I'm getting a series of strings from a .txt file and putting them in a vector. But have a problem, the strings come with an unwanted start, example: Depende: lsb-release Depende: libatk1.0-0 Depende: libc6 Depende: libcairo-g...
asked by 08.04.2018 / 14:31
1
answer

What is the best way to group objects in SFML?

If I have for example 3 different shapes in SFML, and I want to rotate all in relation to a single center, as if these 3 shapes were inside a square, what would be the best shape? Would it be leaving them inside a view and rotating the view? Or...
asked by 25.04.2018 / 22:14
1
answer

Problem in deallocation of memory

Good evening guys, I've been facing a problem regarding the free () function in the destroy () method for memory deallocation. After inserting values into the binary tree at first, I can even deallocate through the free () function, but after...
asked by 11.05.2018 / 04:56
1
answer

Allocate space for a vector vector of double

I'm trying to allocate space in memory for a vector of vector of double. I know that for a vector vector I can do vector<vector<double>> Vetor(51, vector<double>(47, 1)) And this generates a vector [51] [47] but in the ca...
asked by 07.03.2018 / 14:30
1
answer

Extending parent class method in C ++

I have a sphere class: class CEsfera{ protected: double centro[3]; double raio; public: CEsfera(); CEsfera(double x, double y, double z, double r); mostra() { for (int i=0; i<3; i++)...
asked by 30.03.2018 / 20:24
1
answer

Something equivalent to sstream library from C ++ to C

I need something similar to the stringstream that has in C language for C language, I need a lot of it because I want to perform querys on a database using C (C mysql connector). As I had no idea something like what I had in the sstream libra...
asked by 01.03.2018 / 02:39
1
answer

Use C ++ variable in assembly (Arduino)

I've put an interesting code on this page . const uint8_t MachineCode[44] PROGMEM = { 0x25, 0x9A, 0x2D, 0x9A, 0x40, 0xE5, 0x5F, 0xEF, 0x6F, 0xEF, 0x6A, 0x95, 0xF1, 0xF7, 0x5A, 0x95, 0xE1, 0xF7, 0x4A, 0x95, 0xD1, 0xF7, 0x2D, 0x98, 0x40, 0xE5,...
asked by 20.03.2018 / 20:41
1
answer

How to identify end of entries in C ++ using cin

In my college work, we submit our code to a platform that "corrects" the code automatically (inserts the entries in the code and compares the outputs generated with the template). To get the entries, we always use the command cin . T...
asked by 24.06.2018 / 00:45
1
answer

How to print a list vector (a pointer to a list)

Hello, I would like to know how I can print a pointer to a list, as a list vector. I made a pointer pointing to list and I do not know how to print those values. I tried using an iterator for each position of the vector and printing from start t...
asked by 13.03.2018 / 23:55
1
answer

C ++ - What are the effects of the & in Hexadecimal operator? [duplicate]

I'm having a project of a Gameboy emulator for android, so far what I got was: Identify the type of game (GameBoy, Super GameBoy, GameBoy Color, etc.). Identify the game region. Extract the game title. First of all, all the referenc...
asked by 04.04.2018 / 12:57