Questions tagged as 'c++'

1
answer

String conversion in double C ++

I would like to convert a string passed to a value of type double . Example: string expressao = "1+1"; double x, y; So, x = expressao[0]; and y = expressao[1]; And the sum of x+y returned 2 in respo...
asked by 01.06.2014 / 00:39
1
answer

Creating file Makefile

I need to write a Makefile file, I've been able to set up something by searching, but I've tried to make it better for what I need, and I'm not getting it. What I'm trying to do: 1 - Check all .c or .cpp files if they have their equivalents ....
asked by 24.06.2017 / 09:01
1
answer

Bug when using loop control

When I run this code it buga , I type 1 and it enters the function register but not pause to read the data (it keeps printing things without stopping) when I change cin by scanf it works). Can you make it work with the cin comm...
asked by 18.06.2016 / 02:02
1
answer

Targeting failure during image conversion to grayscale

I am writing code that should get a colored image file (PPM format) and turn it into grayscale (PGM format in ASC II code) After having made functions to read, convert colors and save the file, the code is returning a segmentation fault error ea...
asked by 21.03.2016 / 02:55
1
answer

Download large with QNetworkreply :: readAll freezes for a few seconds

When using QNetworkreply::readAll to write data to a QFile , at the time the download arrives at the end, there is a fast freeze of 2 to 4 seconds and it also varies depending on the network or site I am downloading, to normal and t...
asked by 05.11.2016 / 20:12
1
answer

Changing the ownership of a QML object by C ++

I'm trying to make a change to a property of a (Rectangle) object that was instantiated in QML, but I'm not able to do it because the findChild strong null . I'm following the following documentation: - Integrating QML and C ++
asked by 04.11.2016 / 19:04
1
answer

How to generate Array-Adjacent of a BFS from a txt file? C ++

I'm using CodeBlocks. I have a .txt file that represents a maze, everything that is after : are rooms: Thefirstlineofthefileshowsthestartcoordinate,whichinthiscaseisAS.Everyletterwrepresentsawall.SomyBFShasastheinitialnode(orinitialro...
asked by 10.01.2016 / 15:43
2
answers

Why delphi / pascal constructors can not be private as in C ++

Is there any reason why I can not leave a delphi constructor private?     
asked by 09.04.2016 / 19:15
1
answer

Qt5 Deploy on Linux - No installation

I'm developing a solution in QtCreator Qt version 5.4.2. Well, I have the following problem: When I run on my machine and on any Ubuntu Vivid (15.04) it works. But when I try to run in Ubuntu 14.04 LTS gives error. There are ways to make this ap...
asked by 17.06.2015 / 03:32
1
answer

Student Row. Help in structuring the code

My question is in case 1 , how to include elements in the queue, in this case, mat and media . Here is the code below: #include <iostream> #include <cstdlib> #define tamanho 20 using namespace std; struct Aluno{...
asked by 13.05.2015 / 20:01