Questions tagged as 'c++'

1
answer

"void * reader (void * i)" What is the equivalent in C ++?

I'm studying Operating System and I have an exercise to do in C ++ and I'm having doubts (the book only comes in Java), I have to implement a classic reader and writer problem using traffic lights and control variables ... And I'm studying some...
asked by 08.12.2017 / 21:46
0
answers

QCoreApplication :: applicationVersion does not "recognize" RC_FILE when using Mingw

I've created a rc ( Resource File >) and added it to the project ( winvertest.pro ): rcexample.rc #include "winver.h" VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGS 0x0L...
asked by 08.11.2017 / 21:32
0
answers

Why use gets and sets in classes? [duplicate]

What is the reason and when actually using gets and sets instead of a variable published in classes? They say that it is a bad practice to use and modify a variable as public, why? Example 1: class Teste { private; std::string nome...
asked by 30.10.2017 / 22:18
0
answers

Error reference indefinite - C ++

Hello! I'm trying to compile my program in C ++ (it calls a function written in Perl) and it is returning a long list of "undefined reference" errors: testeperl2principal.o: na função 'S_croak_memory_wrap': testeperl2principal.cpp:(.text+0...
asked by 19.11.2017 / 15:13
0
answers

Why does this parser fail in Boost Spirit C ++?

When I enter the input tt or tt the program returns me "parse failed". But for me the grammar seems correct, so I think it's some peculiarity of the library. Could someone explain the reason for the error? Here's my code. #include <boost/co...
asked by 11.11.2017 / 00:56
1
answer

What is the purpose of call conventions and which one to use?

What are the conventions for calling __fastcall, __stdcall, __thiscall, __cdecl, __fastcall, and how do I know which one to use? For example, in some function that needs to be called faster (I could use inline but I'm avoiding it because of c...
asked by 02.11.2017 / 15:30
0
answers

Display array during debug with android NDK

In android, when debugging my program I can see the vector and its contents: Ihavetopassthisvectorfromandroid(java)toC++andI'musingNDK.publicnativevoidtesteVetor(double[]vetorDados);testeVetor(vetorDados);testVetorisafunctioninC++: Currentlywhe...
asked by 14.10.2017 / 21:13
0
answers

Problem with my horizontal bar

I'm having problems with my horizontal bar, the problem is that it is not increasing the value of the "iVar" variable from 1 to 1, it's increasing by 5 or even more depending on how much I spend in the iMax value, How do I fix this problem? #d...
asked by 12.10.2017 / 02:28
1
answer

What is the mysql_store_result () function for?

Hello, I would like to know the real function of the mysql_store_result () method inside the C ++ language when we are working with mysql database.     
asked by 16.09.2017 / 01:02
1
answer

Problems making Arduino serial connection with PHP

I'm trying to make a thermometer with PHP in Windows 10, and I'm capturing the data through an Arduino with the code: #include <OneWire.h> #include <DallasTemperature.h> // Conectar o pino central dos sensores ao pino 10 do Ardui...
asked by 06.09.2017 / 18:07