Questions tagged as 'c++'

1
answer

QT + OpenCV on Mac OS 10.10.3 com error: symbol (s) not found for architecture x86_64

I recently installed Qt Creator and OpenCv. I was able to quietly compile the separate QT and OpenCv. But I can not compile them together. My .pro file looks like this: #------------------------------------------------- # # Project crea...
asked by 27.06.2015 / 19:27
2
answers

When to use "inline"?

Everyone says that you do not have to use inline in the functions since the compiler knows what to do better than the programmer. But if it has in the language it should serve something. Is it useful in any case? When to use it then?...
asked by 14.02.2017 / 13:47
2
answers

How to make my C ++ programs multi-architecture (32 and 64 bits)?

Developing a native C ++ application using DevCPP and the MinGW compiler, when running the application on another machine I noticed an error regarding architecture, because my program only runs in 64-bits, how can I make it multi-architecture? T...
asked by 22.07.2016 / 18:26
2
answers

Set values or not in c ++ variables

Good evening. Should I set values in variables when creating them in C ++? An example: int x = 0; int y; What's the difference in these two cases? And what happens in memory when I initialize it with 0 and without it.     
asked by 10.12.2015 / 23:48
1
answer

How does the class constructor declaration in Qt?

Work with C and a little assembly on Atmel AVR microcontrollers. I'm trying to understand how the framework extends C ++. I created a new project with Qt Creator (Widgets), and generated the following code: MainWindow::MainWindow(QWidge...
asked by 08.08.2015 / 22:44
3
answers

Setting thread priority in C ++ 11

In the program I'm developing I have two std :: threads that are always active throughout the life of the program. However, I consider that the function of one of them is minor and would like to change their priority. I took a look at the doc...
asked by 05.02.2014 / 01:05
1
answer

What is segmentation fault?

This error often occurs with faulty codes. I do not see it occurring in other languages. Why does it occur? What does it mean?     
asked by 13.01.2017 / 11:31
1
answer

Is it possible to initialize only some members of an array in C already in its definition?

I know you can do this: int a[5] = { 0, 3, 8, 0, 5 }; or int a[5]; a[1] = 3; a[2] = 8; a[4] = 5; Can you do the same in just one line, already in the definition?     
asked by 22.03.2017 / 12:33
1
answer

How to insert dynamically into a std :: array?

I'm migrating from C language to C ++, and I want to stop using traditional C language media as the vector of it. Is it possible to use std::array to insert elements dynamically as in std::vector ?     
asked by 08.11.2016 / 15:52
1
answer

GCC compiler command to display #ifdef

What compiler command do I use to display this line at runtime? #ifdef DEBUG double tInicio_=clock() ; #endif     
asked by 02.07.2016 / 22:51