Questions tagged as 'c++'

1
answer

Problem configuring serial port in C ++ on Linux?

Description: I have a problem that is the port of a code in C # for C ++ not working because of the serial port. I also noticed that on device / dev / ttyS0 I am seeing the same bytes as in C ++ and not those that are read by C #. The ot...
asked by 13.07.2016 / 20:31
1
answer

Search for text in a String as a "like"

I want to do a text search, like the ones I do in MySQL. Ex: LIKE "9% 4" I tried to implement a find_if() , but without success. #include <iostream> #include <string> #include <algorithm> using namespace std; int m...
asked by 12.07.2016 / 09:44
2
answers

How to make a local variable in C (or C ++) global?

Can I make a local variable turn into global, even though it's inside a function? In C language or even C ++ if it does not exist in C. I have already seen something of the type in Java, but I do not know exactly how it works.     
asked by 19.06.2016 / 18:50
1
answer

QT - Display WebCam on a QLabel using another Thread?

Hello, I'm doing a project in C ++ using GUI QT. In the project in question I need to display images of a camera in the window, but in doing so, the performance of the window is very compromised, all other buttons and features that it includes i...
asked by 03.08.2016 / 17:44
1
answer

Reset a QAbstractListModel

I would like to know how do I reset or clear the data of a QAbstractListModel? I'm using version 5.6 of Qt. The problem I am having is when I try to perform an update of the information that is in the Model, where I need to clean the data and...
asked by 16.06.2016 / 16:00
2
answers

How to use the Chr () function in C ++ Builder?

I need an example of using the Chr() function or something equivalent in C ++ Builder. I need to do a function to decrypt the database password.     
asked by 03.05.2016 / 20:28
1
answer

Qt QDebug does not work (does not display messages)

I have the Fedora 23 operating system and I use Qt to develop graphical interfaces (GUI), however my debugger does not work: I'm trying to print messages on the console using qDebug () , but nothing is displayed . I've tried everything and...
asked by 28.04.2016 / 19:13
1
answer

Use of delete function - Inheritance of a QList

When compiling I get the following error, in QList . I'm using Qt 5.6. error: use of deleted function 'Vitamin: Vitamin (const Vitamin &)' current-> v = new T (* reinterpret_cast (src-> v)) error: use of deleted function 'Vitamin:...
asked by 08.06.2016 / 15:57
1
answer

What is the C ++ apvector

The college professor asked to search the sorting scripts and run tests with them, determining which is best in what situation. I found the scripts, however on the site the guy does not show how to run , and he uses a apvector I do no...
asked by 06.06.2016 / 18:26
1
answer

How to pass the class (Test2 test2) as reference in the ("super") C ++ constructor?

Based on this response In C ++ which the command corresponding to super () of Java? Class Teste2{ int x; int y; public: Teste2(int x, int y){ . . . } } class Testando{ Teste2 *teste2; public: Testando(Teste *teste2) {. . . . class T...
asked by 27.03.2016 / 21:51