Questions tagged as 'c++'

1
answer

Do the member functions of an object "reach" the object's variables?

That is, internally, can I directly manipulate a variable of the object, within the body of the function? Is this equivalent or would it be necessary to do so with the this always? ISBN has the member variables n1, n2, n3, and x....
asked by 30.05.2018 / 19:30
1
answer

Algorithm of sum of square matrices - Divide and win

I am having problems to implement an algorithm that returns as a result the sum of two square matrices through the divide and conquer method. void suma_matriz(int matriz1[MAX][MAX], matriz2[MAX][MAX]) { int i = 0; int j = 0; int aux[MA...
asked by 16.07.2018 / 22:42
1
answer

problem with scanf

I have a problem with my programs and sometimes I try programs with which I have to use more than one entry data, however when writing them, only the first entry data is read, skipping the others, and if I modify the program removing the only da...
asked by 19.07.2018 / 20:22
1
answer

Get the color of a QT LCD Number

To insert the color in one of my LCD Number I simply use the instruction: this->ui->lcdNumber_23->setPalette(Qt::red); But I can not find how to get the current color of an LCD Number, I tried to get the palette but I can not find...
asked by 24.05.2018 / 23:08
1
answer

List linked by reference to a method, c ++

I'm in need of help. I'm trying to read a csv file to pass the fields to a linked list and then pass it as a reference to some methods in a class. while(linea!=VACIO){ Lista<std::string>*datosCultivo; cultivos.datosLista(linea, d...
asked by 26.05.2018 / 06:21
2
answers

Exceptions c ++

I have to make some exceptions for possible errors, I would like if in the menu you type a letter you will see a writing error, and in the notes you will not type a note less than 0.0 and neither higher than 5.0. The exceptions must be in a daug...
asked by 27.05.2018 / 02:11
1
answer

I lose 2 records when opening an ofstream C ++

I have a serious problem that I can not solve. I do not understand why, when opening an output file I am losing 2 positions of a record vector that I do not touch anywhere. The problem, I think, I hope you can correct me, is in the module Lis...
asked by 07.08.2018 / 07:57
2
answers

Vectors and Lists in C ++

I am learning C ++ and I have doubts about the use of lists. I'm programming with Sublime Text on Linux. The following code gives the compilation problem 'vector' was not declared in this scope . #include <iostream> #include <vector&...
asked by 10.03.2018 / 17:40
1
answer

Visual studio scrubber [closed]

I try to debug the code with visual studio but when executing it step by step I change the window to a call ostream and I do not know what that is. Can you debug the code without having to go through the ostream window? For examp...
asked by 21.02.2018 / 18:17
1
answer

I have a question with iterators of istream in C ++ 14

I have the following lines: using par = std::pair<std::string, unsigned>; std::istream& operator>>( std::istream&is, par & p ) { is >> p.first >> p.second; return is; } std::ostringstream out( "qwe 12...
asked by 08.02.2018 / 00:27