Questions tagged as 'c++'

2
answers

Problem loading file in memory

I'm trying to load several files into memory (small files), but the problem is that when I try to load another file soon then all files have the same name as the last file loaded. I'm using a struct that contains name, size of the name...
asked by 17.07.2014 / 00:39
2
answers

Replace values within string

How do I replace values within a string ? The string will look like this: gabriel = 1.73,derp = 1.80, Take into account that this structure is: nome = altura, nome = altura, . In case, I want to replace the height of gabriel...
asked by 12.02.2015 / 08:45
1
answer

Copy and move constructors are called only in the creation of an object?

Are the move and copy constructors only called when creating an object? if yes, after the creation of an object, it is not possible to invoke either the move or copy constructor of that object, right? The doubt came from here: class En...
asked by 11.03.2018 / 13:09
2
answers

split from an integer in c ++

I made the following program that says the age of the person and the number she thought, but the final result generates a number of 4 figures according to the calculations below suppose I thought of the number 12: Multiply by 2: 12 * 2 = 24...
asked by 19.09.2017 / 07:53
1
answer

Qt SQL - ERROR (42601): syntax error at or near

I'm currently developing a program to help manage a barracks in my city, I'm using Qt to create the graphical interface and other necessary libraries like database manipulation, for the server I'm using postgres , when trying to cre...
asked by 31.08.2018 / 13:44
1
answer

How to create a "defnine" with indeterminate arguments?

I've seen somewhere for some time that this was possible, and now I need to implement this to make it easier to read the code. It is the following: void A::adicionarTodos () { lista.adicionar(A1::id); lista.adicionar(A2::id); [e...
asked by 08.04.2017 / 21:27
2
answers

Read a txt file and place each character in a position of an array in C

I tried the code below but it did not work The big problem is fscanf putting each character of the text in an array position #include <iostream> #include <stdio.h> using namespace std; int main() { int a; char texto[1000]; F...
asked by 15.05.2017 / 05:49
2
answers

Handler? What is this and what is it for in C / C ++?

There are times when I see lots of code using this HANDLER type. What is it and what is it for? Where I find tutorials that teach you how to use it.     
asked by 08.12.2017 / 05:36
2
answers

How to get the length of a char array?

How do I get the size of a set of char ( char** )? The way I'm trying is always returning me the value 4. const char* opcSalgados[] = { "Pastel", "Mini pizza", "Coxinha", "Pao de queijo", "Pao de frango com queijo", "Pao de carne"...
asked by 14.12.2017 / 16:45
1
answer

C ++ - Convert Mat to array of integers in Opencv?

I'm doing an image manipulation project using OpenCV . I need to parse the pixels values of a "binarized" image, for this I am trying to convert my Mat file image to a array of integers, more specifically an array of integers. I'm tryi...
asked by 02.09.2016 / 21:20