Questions tagged as 'c++'

0
answers

SDL2 Does not draw pixels correctly

For some time now I've been developing a CHIP8 emulator to learn a bit of emulation, I've implemented all the instructions except the sound I'm still going to implement, but I'm already taking a long time to create a shape that I can draw the sp...
asked by 22.08.2018 / 14:49
0
answers

How to send an object using socket c ++ visual studio [closed]

I'm trying to send an object to a server socket. The client and server have the same class I use to store the data. It's all working that way, but I'm having problems on the server side. This is the class I'm using. class tMensagem{ pr...
asked by 28.09.2018 / 22:07
0
answers

Program does not execute the two For loops inside the if - C [closed]

I have 2 links in an if , as shown below: if (grid[j][k] == words[i][0]){ int el = j, col = k; //Metodo direita, baixo for(l=0;l < wordlen(search_word);l++){...
asked by 20.09.2018 / 01:58
1
answer

Dijkstra Algorithm - How do I change the reading of the txt file in C to be identified in int and not string?

Good evening, I have a question about how to change the reading of the txt file, where the compiler identifies with char however within the file that I need to read, have only numbers, could anyone help me? Attached is the error you are repor...
asked by 10.09.2018 / 17:12
1
answer

Utility of coercion operator reinterpret_cast

What is the coercion operator reinterpret_cast ?     
asked by 12.08.2018 / 17:40
0
answers

Distribution addicted to using rand () function [closed]

Hello, how do I use the rand() function with the range Y ∈ [11, height + 9] and X ∈ [11, width-1]. srand (time(NULL)); y=rand() % ((altura+9)-11) + 11; x=rand() % ((largura-1)-11) + 11; gotoXY(x, y); cout<<"o"; Is it like this...
asked by 03.08.2018 / 23:26
0
answers

Library error libpq-fe.h

I'm using codeblocks and the library however I get the following error: fatal error: libpq-fe.h: No such file or directory I have already added the path pointing to the header file by the following path Project - > Build Options - >...
asked by 04.07.2018 / 21:19
1
answer

Get result of an expression in c ++

I'm almost finishing my expression interpreter. But I have no idea how to do the most important part: The result I would learn a lot from any idea. main.cpp #include <string> #include <iostream> #include <fstream> #incl...
asked by 20.06.2018 / 03:18
0
answers

Problem running main components

Hello, I'm running an algorithm for classifying objects in an image. At the moment I need to determine the obejto the center coordinates to calculate the diameter and apply compactness. The part of the code that does this is: cv::Point enco...
asked by 21.06.2018 / 20:48
0
answers

3D cylinder with 2D lines in OpenGL

How to calculate an array of 3D points that form a 3D cylinder and draw the cylinder using 2D lines (connecting the points of the matrix and forming a mesh of the representation of the 3D object)? Cylinder::Cylinder(int r, int h, Point *...
asked by 17.06.2018 / 01:41