Questions tagged as 'c++'

1
answer

Integer conversion to price using QLocate

How can I use QLocate to convert integer to standard Brazilian price form (without rounding off the values)? Code: QString n1 = "1.020,50"; QString n2 = "10,33"; int valor1 = n1.replace(".","").replace(",","").toInt(); int valor2...
asked by 21.03.2014 / 13:15
1
answer

Print position of an array

The intent of this program would be to print the position linha and coluna where the largest value in the array is located, can someone tell me why the result is printing 0x0 and if there is another more effective way ? In m...
asked by 26.06.2014 / 16:05
1
answer

Copy local QVector to Class QVector

This is what I'm doing in the Nail LineChart chart for a class work, I'm having a lot of difficulties with the C ++ language, in a certain part of the code I pass by a QVector<QPoint> parameter, and I want to paint on the DrawLin...
asked by 26.05.2014 / 02:38
2
answers

Problems inserting values into vector pointer

I'm having trouble trying to perform a programming exercise that was passed to me, where you are asked to "create a vector-type pointer variable with 20 character-type occurrences". #include <stdio.h> #include <conio.h> int main()...
asked by 27.11.2014 / 04:20
1
answer

How to simulate a browser?

More specifically, I'm going to stream music with MP3Skull , which has no API. So far, what I was able to do was to use an HTML Parser and go div by div looking for the common id of all songs. However, the number of results is limited. In an or...
asked by 01.12.2014 / 10:34
1
answer

function in graphics.h

I'm trying to learn a bit more about the libraries in C / C ++ to do more things so I went behind the graphics.h library and went after the most basic code I found, which was: #include <graphics.h> int main(){ int gdriver = DETECT, g...
asked by 28.11.2014 / 03:59
0
answers

SDL2 / C ++ - Execute loop at a specific frequency

I have a project of a emulator of CHIP8 that was already stopped for a long time so I went back to work on it today, I can extract and draw sprites and I have implemented almost all instructions, but sometimes the emulator runs very fast until i...
asked by 05.11.2018 / 13:37
0
answers

How to promote Qgraphicsview in Qchartview?

I'm new to Qt Creator, I want to know how to display 2 or 3 graphics on a single screen, I've already seen some examples that Qt provides, but they do not show how I want to learn how to do it, please Help. p> /file.cpp #include <QtWidget...
asked by 27.12.2018 / 16:10
1
answer

Read Dates file and count days elapsed in the year

I'm trying to make a program that opens a file and calculates the days elapsed from the date. The dates are in the file as follows: 30-10-2018 . But I'm having trouble with the output that is printing garbage. Follow my code so far....
asked by 30.10.2018 / 20:33
1
answer

Compile C ++ file in VS Code using external cmd

I can compile files in VS Code normally, however the files are shown in the terminal of the own program, which does not allow the insertion of characters. How can I configure to be able to use a terminal that allows me to interact?     
asked by 24.10.2018 / 18:07