Questions tagged as 'c++'

3
answers

How to clean screen and re-order data by keyboard in c ++ IF ELSE

I am studying c ++, I have the following program, it works but I would like it not to be closed. //Ficha 4a /*pregunta dos números, que operación deseas hacer y muestra resultado*/ #include <iostream> using namespace std; int main () {...
asked by 05.03.2018 / 19:16
1
answer

Know if 2 lists are equal recursive method

I am trying to implement a recursive function that returns True if 2 lists are equal. list is a pointer to a structure of this style: struct nodo { int elem; nodo *sig; }; typedef nodo *lista; The code I did was this: bool igual...
asked by 06.04.2018 / 19:48
1
answer

c ++ problem with operator overload [duplicate]

I try to make a simple sum of two objects and I skip error took time trying to solve it.    Complejo.cpp #include "Complejo.h" Complejo::Complejo(double real, double complejo) { this->real = real; this->complejo = complejo...
asked by 01.03.2018 / 06:56
1
answer

Doubt about recursion

I understand that the following problem refers to the data sorting solution using a Quicksort or at least that is supposed to be, and I have been asked to find the error by which the program gets stuck, but no matter how much I searched I find i...
asked by 11.03.2018 / 21:08
2
answers

Float with one unrounded decimal C ++ [closed]

A cordial greeting to all. I need help, I want a number for example 0.57, to be expressed as 0.5. that is to say with only one decimal without rounding. I could express with a decimal but it is rounded, for example: 0.57, it is expressed i...
asked by 01.03.2018 / 19:43
1
answer

Doubt with reported errors with Valgrind

I am learning to use Valgrind to detect errors in my program. I have encountered a memory leak error. This is the code: Class node #ifndef NODO_H_INCLUDED #define NODO_H_INCLUDED #include <iostream> template <typename DATOA,...
asked by 13.01.2018 / 21:27
1
answer

JSON Reader does not work

I have this code: QProcess process; process.start("powershell -Command Invoke-WebRequest -Uri http://3ds.titlekeys.gq/json_enc -OutFile titles.json"); process.waitForFinished(); if (QFile::exists("titles.json")) { QString content;...
asked by 24.12.2017 / 19:20
1
answer

Compare two Arrays

The program consists in comparing two arrays to see if it has at least one element repeated. The problem is in the function mismosElementos , specifically in: estaElemento(a[i],b,usados)) The error resides in a[i] .    Error:...
asked by 16.12.2017 / 13:37
1
answer

error: jump to case label [-fpermisive]

Good night! I try to create a menu in c ++ in which the entered data can be read (reason of the fstream library); however, when trying to compile the program, mark the following error: error: jump to case label [-fpermissive] The code is as...
asked by 08.12.2017 / 04:00
1
answer

function search by string

I'm trying to implement a method that tells me how many zones are in the vector I'm using the method strcmp but I get an error I'm using the library #include <string.h> is the first time I use it and not I know what to do her...
asked by 19.11.2017 / 20:27