Questions tagged as 'c++'

1
answer

Pass a struct as parameter

I need this struct typedef struct _wfs_ptr_retract_bins { WORD wRetractBin; USHORT usRetractCount; } WFSPTRRETRACTBINS, *LPWFSPTRRETRACTBINS; Turn a parameter that I'll put here. typedef struct _wfs_p...
asked by 04.02.2017 / 01:05
2
answers

(C ++) Deque: Differences between types of access to positions

I'm implementing the Dynamic Scrolling Backpack Problem in C++ and chose the deck to build my list. Studying on it, I realized these two different ways of accessing a specific position in the list: //Retorna o item i da lista mydeque my...
asked by 28.09.2016 / 20:19
1
answer

Manipulating listint in c ++

My Class class Grafo{ int numeroVertice; list<int> *arestas; public: Grafo(int vertices); int addVertice(int quantidade); void addAresta(int verticeOrigem, int verticeDestino); void remAresta(int verticeOrigem, int verticeDestino); void...
asked by 23.09.2016 / 21:26
1
answer

How to use SQLite in Qt 5.7 with Android [closed]

Would you like to know how to communicate with the SQLite database on android using QSqlDatabase ? I have done some tests and for desktop I can communicate with DB, but with android I am not able to make the same communication.     
asked by 20.09.2016 / 17:21
1
answer

Problem when printing string array from a pointer and repeating the main C ++ method

I have an "Element" class that has a "items" pointer, of type string (from the string.h library), responsible for saving a reference to an array of items in the Element. Everything works fine if I do not run the app within a while. However, whil...
asked by 27.09.2016 / 22:53
1
answer

Libraries in CMake as submodule in project

I'm developing a C ++ project where I make use of some libraries I've previously produced, the problem I do not know how to import them into my new project without putting the full path in the include and adding all the files in my project's cma...
asked by 11.10.2016 / 23:12
1
answer

How to fill an array [] [] with struct in C ++, in the code below

I need the employee code in a [2] [100] matrix and the sum of the children multiplied by how much each wins, in the module: int calculo(CADASTRO_FUNCIONARIOS cadastro[100], int n) Code: #include<stdio.h> #include<stdlib.h> #i...
asked by 31.08.2016 / 20:24
1
answer

Compilation error -lpthread

I'm trying to compile a .c file, but whenever I call gcc filename.c, I get the following error: c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread collect2.exe: error: ld returned 1 exit status [Finishe...
asked by 01.09.2016 / 18:26
1
answer

"Undefined symbols" error while compiling project

I'm trying to compile a project in C ++, but it's giving the following error: Undefined symbols for architecture x86_64: "knapSack(int, int*, int*, int)", referenced from: _main in main-b722ae.o ld: symbol(s) not found for architec...
asked by 23.09.2016 / 18:59
1
answer

Warming - Source file not compiled

asked by 02.09.2016 / 20:10