Questions tagged as 'c++'

2
answers

How to generate an .o of the implementation of a .cpp class without the main function in g ++?

I would like to compile the implementation of a related class to only generate an object code of it. This is the class implementation: #include <iostream> #include "gradebook.h" using namespace std; GradeBook::GradeBook(string name_cou...
asked by 17.09.2016 / 22:15
1
answer

How can I upgrade C ++ to C11 on Ubuntu 14.10?

How can I upgrade from C ++ to C11? Details: Ubuntu 14.10 32b GCC 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
asked by 27.03.2015 / 00:15
1
answer

What does runtime dependencies of objects mean?

What is the meaning of runtime dependencies of objects in object-oriented programming? I came across this question by studying C ++.     
asked by 12.12.2014 / 15:04
2
answers

Where is the function for which a fallen lambda for pointer points stored? How is it released?

I recently learned that I can do this: auto a = +[]{return true;}; a = +[]{return false;}; And I understood that a lambda that does not capture anything may fall to a pointer to function, as confirmed by GCC : bool (*)() Bu...
asked by 28.07.2016 / 04:08
2
answers

How to move, rotate or scale an object on its local axis in OpenGL?

Hello, I have a HTransform class that stores an array, position, orientation, and scale for each object, this class is the base class of each object or entity. I made a function to move the objects and another to update the array when the...
asked by 02.04.2014 / 01:22
1
answer

How to leave a transparent window using Qt?

I'm developing a college job at Qt . I would like to make the background of my application transparent. I researched a little and the function I found was: this->setWindowOpacity(0); However, Qt applies opacity to the entire...
asked by 15.05.2014 / 08:08
1
answer

Is there a problem in declaring many noexcept functions?

I see many C ++ code in which the programmer is sure that the function is going to throw an exception, but does not tell this to the compiler, perhaps because it can cause some problem in reporting many functions like noexcept? Is there any prob...
asked by 27.11.2018 / 02:45
1
answer

What are the differences between macros and constexpr? When is it preferable to use one instead of the other?

I have not had contact with C ++ for some time, until I decided to create a project to test a solution. As I knew before, I created a macro to use a value as "constant" later, eg: #define MAX_ENTRIES = 10 So Visual Studio recommended that y...
asked by 23.09.2018 / 04:26
1
answer

Binary Tree returning empty in search

In my menu it is not making the correct output in the print. In addition to the search return only empty tree. #include<iostream> #include<string> #include<stdlib.h> #include<stdio.h> using namespace std; typedef int T...
asked by 06.11.2014 / 13:49
1
answer

How to use QVectorQVector double as array?

In mainwindow.h I have: private: QVector<QVector<double> > numbers; //Variável que será minha matriz public slot: void realizar_calcs(QVector<QVector<double> > &numbers); Na mainwindow.cpp void Ma...
asked by 09.11.2014 / 22:14