Questions tagged as 'c++'

1
answer

Opencv: How to import automatic lib

Good morning, I'm starting to program with OpenCV in C ++ with MinGW, but I'm having difficulty with lib files. Every time I need to compile a program, I need to put, for example, -llibopencv_videoio330 . I would like to know if there is a...
asked by 08.09.2017 / 15:57
2
answers

How to connect a MySql database with QT over a LAN?

Hello, at the moment I'm noob in handling servers with databases. I am using Qt Creator 5.3 to develop my project, and I decided to incorporate a Mysql 5.7 bank to it. I'm trying to establish a simple connection between my application and the My...
asked by 23.08.2016 / 22:30
1
answer

c ++ - How to return a value to a previous window in Qt?

Hello, I'm developing a project where I will have many calls to new windows and need to recover a value of these windows to the main window (MainWindow). The problem is that it becomes impossible to get the returned value because, when closing t...
asked by 29.08.2016 / 16:34
1
answer

Conversion from hex to int and toupper does not work

I need help with this code because I have created three functions But the hexToInt function is not converting correctly, it only works if the hex is an integer type 19 and not A or 1D. and the toUpper and toLower functions do not print a l...
asked by 16.06.2016 / 14:31
1
answer

Grayscale in Images - OPENCV

Good afternoon, folks, I have a .bmp image and I want to turn it to grayscale (0-255) through Opencv with C ++ (I do not want to save this grayscale image). From here, I want to go through the image doing the following: For each pixel, if...
asked by 16.06.2016 / 20:17
1
answer

Problem with operator overload

Errors occur when I pass the object of class Name_pairs by output operator << and comparator == . Header: class Name_pairs { public: void read_names(); void read_ages(); void pr...
asked by 01.07.2016 / 21:45
1
answer

Integrate C and C ++

Good morning everyone. I have a main program in C, and I just want to call a function that is in another C ++ file and get the return of this function. How do I do this? I researched and saw that "extern" can help but I am not succeeding....
asked by 07.06.2016 / 16:13
1
answer

How to Calculate CRC Modbus RTU

I'm trying to calculate a crc modbus in an application for PIC, but the crc returned is always incorrect compared to online simulators .. follow the code void CRC (unsigned char* msg, unsigned char* out) { //char CRC16[2] = {0xFF,0xFF};...
asked by 28.03.2018 / 19:05
1
answer

C ++ execute secondary program, only if the command is entered

int main() { system("F:\AI\iapt2.exe"); system("pause"); return 0; } Good evening, I have this code right, it will open the program iapt2.exe when running, but I would like to insert an argument, so that it runs. Type just open the progr...
asked by 05.06.2016 / 06:33
2
answers

Reset position of a vector to ensure there is no dirt

How do I zero the position of an integer vector, for example, to ensure there is no "dirt" when allocating the position in memory in C ++? Some language function or algorithm.     
asked by 16.03.2016 / 13:31