Questions tagged as 'c++'

1
answer

Delete element x from a list - Recursion

I have to create a function that removes all the elements with numerical data x from a list. My Code: struct nodolista { int elem; nodolista *sig; }; typedef nodolista *lista; void remover(int x, lista l) { if (l != NULL...
asked by 07.04.2018 / 00:27
1
answer

Problems with copying an array into another dynamic array

I have a problem with the execution of this program. I do not know why it ends up running so abruptly ("The program stopped working"). The results of it are what I hope, however that happens. And I tried many things to avoid it and found that wh...
asked by 17.04.2018 / 16:09
1
answer

invoke functions defined in other files in c ++ [duplicate]

I have the need to include a function defined in an r.cpp file in another called a.cpp, I tried the following: In the r.cpp file: #include "r.h" void lee(){ cout<<" Hola "<<endl; } In the r.h file:...
asked by 22.02.2018 / 18:07
1
answer

Insert an object in a simple linked list

I have to do a project in c ++, where I create figures (in a graphic environment) and these figures have to be inserted in a linked list. At the time of seeing the coordinates of the figures that are inserted in the list, it shows me only the...
asked by 30.01.2018 / 06:53
1
answer

Read an Excel file .csv (C ++)

I am trying to read data from an Excel file saved in csv format, my Excel file has six rows and 49 columns, as you can see in the photo: I want to read data from that file, I'm doing this code: ifstream inFile; inFile.open("datacsvforma...
asked by 15.04.2018 / 01:49
1
answer

C ++ reads files sometimes

I am having problems with a program in which I must generate a matrix (board) with files, the problem is that I can not read the files only from time to time. the code to read the matrix and save it is as follows: void G2048::leerTablero(in...
asked by 14.04.2018 / 03:05
1
answer

Doubt compiling cpp and .h file

Good morning everyone, you see, I have the following files: main.cpp where that class and functions are used. Time.cpp: with definitions of class functions Time.h: with class, member functions + data member. I would like to comp...
asked by 08.01.2018 / 11:20
1
answer

Is it possible from a console application in dev c ++ to create an excel file and enter data?

It is possible that in a console application from dev c ++ you can create an excel file with data entered from there, and if possible how it could be done? I understand that you can create txt files and enter data from c ++, which I have already...
asked by 19.01.2018 / 21:38
1
answer

Qt and Linux - QGraphicsItems with low performance

I'm having performance problems with the painting in Qt and the QGraphicsItems in Linux. It gets very "locked" when I add things to the painted (grillas and others). I put a qDebug in the paint to see which area is drawing: void...
asked by 13.06.2018 / 14:41
1
answer

Shared memory in Ubuntu c ++

I try to make a couple of programs that work with shared memory (Server and client) in Ubuntu, for Windows I have found that you can create shared memory in the following way and it works well. int BUF_SIZE = sizeof(Message) * 2; string share...
asked by 04.12.2017 / 08:58