Questions tagged as 'c++'

0
answers

qsort function to sort a struct

typedef struct{ long At[tam], Si[tam], Sf[tam]; }TDados; For this struct , I wanted to understand how to sort struct by Sf using the qsort function. Can anyone explain?     
asked by 20.03.2017 / 14:57
0
answers

How to copy network files using C ++

I'm trying to copy a file from a server to my machine, simply the code executes, it does not return any errors, but does not copy the file. Follow the C ++ code: #include <iostream> #include <windows.h> using namespace std; in...
asked by 20.03.2017 / 12:12
1
answer

Problem due to queuing

I'm trying to create a queue with structs, but the assignment slice is not working on lines 17/18, I'm not finding the error. Is the logic I'm using correct? error: request for member 'nome' in 'FilaAluno', which is of pointer type 'aluno' (m...
asked by 04.04.2017 / 01:12
0
answers

Google maps API for desktop, and no internet connection

Does anyone know a way to use API from Google Maps for Desktop without an internet connection? I need to map some items on the map, but it is not always that the user will have access to the Internet to load the maps. On mobile this is...
asked by 09.03.2017 / 23:24
1
answer

Project shared with CMake

I have a project with the following structure: Projeto A: | CMakeLists.txt | main.cpp | #include "ProjetoB/ClassB.cpp" | #include "ProjetoC/ClassC.cpp" | vendor/ | Projeto B: | CMakeLists.txt |...
asked by 30.03.2017 / 03:44
1
answer

List operations (static) c ++

Good afternoon guys, I'm having trouble understanding operations on static lists, I know how to create and display, but how do I remove and search within the list, sort algorithms I've already understood some, can help me, please? I'm kind of des...
asked by 12.03.2017 / 20:57
0
answers

SFML Style Application Always On Top

I play a game of FPS with the class sniper, but the sniper does not appear the aim as in the other weapons, which disturbs me when looking at the enemy. I did a program that draws a crosshair. It is composed of a transparent window that has the...
asked by 18.03.2017 / 00:17
1
answer

Recursive linear search c ++

I have a problem here, I wanted to do a recursive linear search using vector and iterators, here's the code: long int busca_sr(std::vector<long int> &amostra, const long int &key){ auto first = amostra.begin(); auto last...
asked by 19.03.2017 / 18:21
0
answers

Error LNK2019 compiling OpenCL Project on Windows [closed]

I'm getting a lot of LNK2019 errors, after I use the nmake command on VS2015 console: kmeans.cpp.obj : error LNK2019: unresolved external symbol clGetPlatformIDs referenced in function "int __cdecl initialize(int)" (?initialize@@YAHH@Z) kmean...
asked by 18.03.2017 / 02:18
1
answer

Thread Usage in c ++

I created a code to check the prime numbers, but I'm trying to use all the cores in my processor to calculate them. #include <iostream> #include <Windows.h> #include <vector> #include <algorithm> #include <thread>...
asked by 03.03.2017 / 22:51