Questions tagged as 'c++'

1
answer

Resize components while increasing window

How can I resize the components within QWidget when I increase the window? Example, how it works:     
asked by 18.03.2014 / 14:52
3
answers

Time measurement in Windows

I would like to know how to best measure the execution time of a C ++ program. I found several solutions on the internet, each with an approach. Suggestions?     
asked by 16.03.2014 / 02:53
1
answer

Pointers with methods, where am I going wrong?

Creating a class that will have two methods one assign another to print vectors with public and then call that method in main . I've been able to do this with the baby steps method. Where am I going wrong and what do I have to...
asked by 08.03.2014 / 21:34
1
answer

Returns the previous month of a date entered in Qt

How do I return the previous month of the date reported in Qt, does it have any function in QDate that does this? I found only the one that adds addMonths . Example: Month 04 reported returns month 03.     
asked by 06.04.2015 / 17:46
1
answer

How is the C ++ reference?

class Data { int d, m, a; public: void inic(int dd, int mm, int aa); void soma_ano(int n); void soma_mes(int n); void soma_dia(int n); }; void timewarp(Data& d) { } As far as I understand the variable d is of a type d...
asked by 20.08.2015 / 15:53
1
answer

Reading entire file

I'm trying to read a simple file, which contains only two lines, but the program only shows one. The program: #include <iostream> #include <fstream> using namespace std; int main() { string str; ifstream myfile; myfile....
asked by 29.04.2015 / 20:46
2
answers

Nested Vector Logic - C ++

I have a problem with the following statement: Given a vector A with n real numbers, get another vector B, also with n real numbers, as follows: B [1] = 2 * A [1] B [2] = 3 * A [1] + 2 * A [2] B [3] = 4 * A [1] + 3 * A [2] + 2 * A [3...
asked by 06.09.2015 / 16:35
1
answer

Delete information from a vector that is in another C ++ class

Hello, I have a question regarding classes in C ++, I hope someone can help me. Thanks in advance! I'm developing a college assignment where I need to enroll students, subjects, and grades, and in the end display some reports, all using the c...
asked by 29.06.2015 / 04:04
1
answer

Problems eliminating node of a Vector

I have two classes: class CAlbum { private: QString Nome; /**< Nome do Álbum */ QString Descricao; /**< Descrição do Álbum */ QString Diretoria; /**< Diretoria onde se encontra o Álbum */ //QPixmap Imagem; std::vec...
asked by 29.05.2016 / 06:08
1
answer

Countdown timer

I'm creating a mini-game with many questions and want you to have time, or want an accountant who go to x to scratch . The counter only needs to have seconds and minutes. Does anyone know of some function C ++ or some "workaround" for a cou...
asked by 14.06.2016 / 04:04