Most voted "c++" questions
C++ is a typed, compiled, multi-paradigm, intermediate level, and general purpose programming language. It should not be confused with the language C. It was developed in the early 1980s by Bjarne Stroustrup as an extension of C. Its evolutionary features include type checking, support for automatic resource management, object orientation, generic programming and treatment of exceptions, among others.
Learn more…2,348 questions
Sort by count of
-
0
votes0
answers32
viewsError in binutils when doing Cross-Pilot. lex: not found
I am cross-piling for the i686-Elf architecture with a Debian 8 86_64 bit host I already uninstalled and installed flex but the error continues! I’ll leave the terminal output. checking for gcc...…
-
0
votes0
answers46
viewsheap corruption compiling an opencv project
void trackFilteredObject(int &x, int &y, Mat threshold, Mat &cameraFeed) { Mat temp; threshold.copyTo(temp); //these two vectors needed for output of findContours vector<…
-
0
votes1
answer270
viewsRegex with STD::REGEX in C++
I am developing a C++ system that I need to get some information from a String using Regular Expression, I am using a regular expression that I used in PHP perfectly, but in C++ returns blank. const…
-
0
votes1
answer120
viewsHow to use Sqlite in Qt 5.7 with Android
I would like to know how the communication with the database is done Sqlite on android using the Qsqldatabase? I performed some tests and for desktop I can perform the communication with BD, but…
-
0
votes2
answers108
views(C++) Deck: Differences between position access types
I am implementing the Backpack Problem with Dynamic Programming in C++ and chose the deck to build my list. Studying on it, I noticed these two different ways to access a specific position of the…
-
0
votes1
answer260
viewsHow to use sdl in Clion
I’m fairly new in c++ , and don’t know how to use sdl in Clion. I’ve tried several ways, it’s like this currently: Cmakelists: project(cppsdl) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11…
-
0
votes2
answers1160
viewsHow to know if a process is running in windows using c# or . bat?
I am wanting to create an application that runs in the background and that monitors some service to know if it is in execution or not someone could give me a light?
-
0
votes1
answer204
viewsCircular Dependency! object creation
The Code is very simple! I have two student classes. h and diciplina. h and need to maintain a circular dependency between them! when I’m a student. h I can create an attribute of the dicipline…
c++asked 8 years, 7 months ago rafaelprog 53 -
0
votes1
answer436
viewsError reading C++ file
Can anyone tell me why the output of this program is just "end"? The file naocompre.txt is in the same directory as the program. Follows the code: #include<iostream> #include<fstream>…
c++asked 8 years, 1 month ago Antonio Gomes 15 -
0
votes1
answer539
viewsClass c++ has no Member named
I’m starting to develop a list list to represent a graph in memory. I’ve only done that first part and I’m getting the following mistake: class std::vector<No> has no member named 'getId'…
-
0
votes1
answer936
viewsDynamic allocation with struct
/* [Error] expected primary-expression before'*' token [Error] 'dia' was not declared in this scope [Error] 'mes' was not declared in this scope [Error] 'ano' was not declared in this scope */ This…
-
0
votes1
answer98
viewsReference return with possibility of invalid object
I have a class of a B tree that has a search method, the search method must return a reference to the value associated with the search key, so the user can change it if he wants, this is a pair used…
c++asked 8 years, 6 months ago ProgramandoMil 357 -
0
votes2
answers54285
viewsAnalyze whether the number is even or odd, and which of the numbers is higher
setlocale(LC_ALL,"Portuguese"); int num1,num2; printf("\nInforme os números: "); scanf ("%i""%i",&num1,&num2); if (num1 % 2 == 0){ printf ("\nO número %i é par e",num1); }else { printf("\nO…
-
0
votes0
answers298
viewsError Indefinite Symbol Reference
Good Morning I am studying the Opencv library for computer vision on Ubuntu 14.04 I am using Eclipse Mars.2 programming in c++. The following error appears: ./image. o: indefinite reference to…
-
0
votes2
answers306
viewsWhy do builders have to have the same class name?
Is it really necessary for the constructor to have the same name as the class?
-
0
votes1
answer790
viewsC++ - Movement on the X-axis (animation) - Opengl
I have been trying to make a simple animation on the x-axis, where I have a chair and I have it drawn by several cubes, and in all these cubes I intend to move the x-variable of them, so that they…
-
0
votes1
answer195
viewsStruct with char vector
So guys, I created this struct typedef struct{ int inicio; int tamanho; int fim; char *elementos[50]; }Fila; And I intend to create a char vector, just as I have created several times an integer…
-
0
votes1
answer39
viewsTreenode properties search using C++
Good afternoon. I’m trying to work with TreeNodes, I would like to do a search based on the Text properties of my Name, but I’m not getting the expected result. What I wanted to appear to me was…
-
0
votes1
answer172
viewsWhen to use a scripting language?
When to use a language of script and what is the ideal setting for its use? I’ve been reading about languages script and I thought about the possibility of using them in my C/C++ project for a game…
-
0
votes3
answers2371
viewsHow to use one if inside the other?
The problem is the following 2 football teams, wanted to create a decision where it would show "Brazil won" or "Argentina won" or "There was a draw". But I can not create three decisions, follows…
-
0
votes1
answer88
viewsSocket C++ Read Error
I am developing a program in C++ using Socket, the problem is that when the client sends some information to me I do not receive. In fact the program hangs. #include <iostream> #include…
-
0
votes1
answer67
viewsHow do Overload the assignment operator into a class that contains vector?
I would like to do the allocation operator’s Overload (operator=), I know I have to reserve memory, and copy data from one to the other, however I do not know how to copy one vector to the other…
-
0
votes1
answer281
viewsError when compiling project with QT
Hello, I’m a beginner in Qt, I took a C++ course with QT in 2013 but I couldn’t take the learning forward and now I’m resuming. Now I’m trying to compile a simple project, just create a new project…
-
0
votes0
answers61
viewsHow can I checksum a Code128 barcode in C++?
I compared my results with others, and it looks like my checker digit is incorrect. Here is my function: QString Barcode::StringToBarcode_Code128(const QString &value){ QString returnValue =…
c++asked 8 years, 4 months ago joaossgoncalves 11 -
0
votes0
answers205
viewsIs there a text editor that integrates with Github?
I’m using Notepad++ to program in the Lua language (small programs, I’m still studying), and I usually save the codes on Github when I have to stop to continue afterwards. But manually I need to go…
-
0
votes1
answer144
viewsDoubt about the use of Static
Code: Header: class Cliente { public: Cliente(std::string nome_c, int num_cartao_l, int livros_c); Cliente(); void calc_Taxa(); const int get_livros() const { return livros; } const std::string…
-
0
votes1
answer286
viewshow to resolve "SIGSEGV" error when using`strcpy`
Hello, I am facing an error "SIGSEGV": strcpy(buffer_ReceiveAutomation, ls_buffer_PPouAUT); << ERROR and buffer is incomplete from recv, but if I change the sizeof(ls_buffer_PPouAUT) by the…
-
0
votes1
answer37
viewsEclipse c++ Neon does not recognize Toolchain
I am trying to install the eclipse on a computer, and it does not recognize the GCC toolchain I have changed the Path and everything but it does not appear at the time of creating a project, someone…
-
0
votes0
answers45
viewsProblems with wxWidgets
I am doing a project using wxWidgets, and when the compilation appears the message: error: cannot specify -o with -c, -S or -E with Multiple files. I’m using codeblocks in Ubuntu and I don’t know…
-
0
votes1
answer3153
viewsPython error api-ms-win-crt-Runtime-L1-1-0.dll
Using Windows 7 64bits, I downloaded and installed python 3.5 but when starting the program I get the following error message: The program cannot be started because it is missing…
-
0
votes1
answer253
viewsPass a struct as parameter
I need that struct typedef struct _wfs_ptr_retract_bins { WORD wRetractBin; USHORT usRetractCount; } WFSPTRRETRACTBINS, *LPWFSPTRRETRACTBINS; Turn a parameter I’ll put here. typedef struct…
-
0
votes1
answer290
viewsI am trying to run a program with countdown , but in the counter it is not decreasing
#include "stdafx.h" #include <windows.h> #include <string> #include <iostream> using namespace std; int main() { int counter, number_1,…
c++asked 8 years, 3 months ago thomson1241 11 -
0
votes1
answer1003
viewsHow to create a child process to an existing process in windows - C/C++
I need to call via Createprocess() or another function of windows a process and link to an existing process, it is possible to? thank you!
-
0
votes1
answer654
viewsc++ - How to pass parameters between Windows in Qt?
Hi, I’m trying to pass a mat parameter from one window to another, being activated by the click of a button. The program compiles and runs normally, but when clicking the button that activates the…
-
0
votes0
answers94
viewsLink timer to a button
Hello, I’m starting now to program in c++ and I’m developing a college project, it’s a periodic table. We thought of using a button for each element (118 in total). My goal is to animate the button…
-
0
votes1
answer2243
viewsHow to fill an array [ ][ ] with struct in C++, in the code below
Need to put the employee code in a [2][100] matrix and the sum of children multiplied by how much each earns, in the module: int calculo(CADASTRO_FUNCIONARIOS cadastro[100], int n) Code:…
-
0
votes0
answers24
views& Operator in C++
I am studying C++ and I have doubts about this operator &, when should I use? void funct(int *var) { (*var)++; } void funct(int& var) { var++; } These two function increments the varial, but…
-
0
votes3
answers181
viewsUse of data type modifiers
Interestingly, I was very interested to know why data-type modifiers are not so widely used. It is said that the modifiers are used to "efficiently" the performance of the program, since you specify…
-
0
votes3
answers336
viewsProblem regarding type in function with variable parameters in C
I’m having trouble solving a problem in a function that receives variable parameters. I have a function that sums a variable amount of numbers, its first parameter is the amount of numbers to be…
-
0
votes1
answer145
viewsWhy doesn’t Clang recognize the basic header (iostream)?
Command line : clang++ "C:\caminho\completo\helloworld.cpp" -o "C:\caminho\completo\helloworld.exe" Code : #include <iostream> using namespace std; int main(){ cout << "Ola Mundo"…
c++asked 7 years, 8 months ago Rodrigo Santiago 1,822 -
0
votes3
answers173
viewsHow to capture the numbers for a single line array?
I have to write a code in C++ in a question where, first, the user enters a number that determines the size of an array, and then, insert in a single row, separated by spaces, the numbers of that…
-
0
votes1
answer110
viewsError in removing c++
Good evening, you guys, I am unable to make the remove function work. Find the number but do not delete the vector value. #include <cstdlib> #include <iostream> #include <string.h>…
-
0
votes1
answer79
views"Undefined Symbols" error when compiling project
I am trying to compile a project in C++, but it is giving the following error: Undefined symbols for architecture x86_64: "knapSack(int, int*, int*, int)", referenced from: _main in main-b722ae.o…
-
0
votes1
answer332
viewsManipulating list<int> in c++
My Class class Grafo{ int numeroVertice; list<int> *arestas; public: Grafo(int vertices); int addVertice(int quantidade); void addAresta(int verticeOrigem, int verticeDestino); void…
-
0
votes1
answer541
viewssend rfid data to Mysql
How do I make sure that when the tag goes through the rfid reader the following information is sent to the mysql database: "Salvador", "Bahia" ?
-
0
votes1
answer108
viewsTwo readers on the Australian
how this code in I read the card and inform if it is registered or not. Now I need to insert two rfid readers in the Arduino. How to add the second rfid reader to this code? include SPI.h include…
-
0
votes1
answer114
viewsglBindTexture does not apply texture in GL_QUADS
Problem: glBindTexture does not apply texture in "GL_QUADS" when using OPENGL in C++. My experience in c++, and mainly in OPENGL is limited, however, I based in this code. I made some few…
-
0
votes1
answer143
viewsProblem printing string array of a pointer and repetition of the main C++ method
I have an "Element" class that has a "items" pointer, of the string type (from the string.h library), responsible for saving a reference to an array of items of the Element. Everything works fine,…
-
0
votes1
answer155
viewsLoad operator "<<" by separating the declaration(.h) from the definition(.cpp)
I’m trying to separate the definition of the class implementation into separate files, but I’m getting Undefined Ference on the operator <<. What I’ve already tried: Change the order of…
-
0
votes1
answer59
viewsProblem reading file
I’m writing a code in C++ and I need to read a distance file that was calculated in another algorithm made in C. This file looks something like this: 100 n (natural number) 0.0000 58.25646 7.1556…