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
votes2
answers99
viewsDoubt classes c++
Good morning guys! I’m seeing classes and I saw this syntax in one of the examples: vector<line *>line_table; vector<line *>::iterator iterator; line parser * basic_parser; long…
-
0
votes1
answer53
viewsDoubt about functions and classes
class base_token { public: typedef enum { t_invalid_token=0, t_symbol, t_integer, t_literal, t_punctuation, t_keyword } type_of_token; private: type_of_token token_type; public:…
c++asked 9 years, 1 month ago alexsander 483 -
0
votes1
answer224
viewsSignal and SLOT C++ with QT
I am developing a software in c++ that captures images from Webcam, before I used Opencv but received an error Undefined Symbols for Architecture x86_64 Until I opened a topic here and nobody knew…
-
0
votes2
answers198
viewsCreate a cross word C++
Who could help me with this? Let me give you an example of what I want. A A R R M M A N N D D O O But the same spaces have to be horizontal, as vertical, has to be square. Thank you…
-
0
votes1
answer71
viewsDefinition and implementation in different locations
Hello. I am having doubts when implementing a header in folders with different paths. I am placing my header in a folder called "include" and implementations in a folder called "src". To solve this…
-
0
votes1
answer295
viewsRecovering serial from hard drive by C++ without using WMI
I need to get the MAC and Serial from the HD volume (in cmd is "vol C:"), I got the MAC by the code: private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { UCHAR…
-
0
votes1
answer1507
viewsExecutable created by Codeblocks opens and closes alone
I have a problem with my Codeblocks program. When I compile and run the program, Codeblocks creates a executable in the Debug folder that is inside the bin folder, located in the same folder where…
-
0
votes1
answer63
viewsError when compiling: "attribute not allowed"
I’m having trouble compiling a program in Visual C++ and as a beginner, I can’t find where the error is. The program is running perfectly in Codeblocks. What might be the problem? Follow the error…
-
0
votes1
answer106
viewsWhat is the operator << in the context of virtual memory paging?
I’m seeing the implementation of virtual memory and I have this code: #define INDEX_FROM_BIT(a) (a / 8*4) #define OFFSET_FROM_BIT(a)(a % (8*4)) static void set_frame(u32int frame_addr) { u32int…
-
0
votes1
answer60
viewsCvrtrees function parameters::Train() - Opencv / C++
Hello! I need to use the function CvRTrees::train() Opencv, but I don’t quite understand the parameters used. To help, the site has no documentation on the parameters of this function. The…
-
0
votes0
answers404
viewsHow to draw a progress bar?
Hello. I am using the following code to draw the window background and progress bar: case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hWnd, &ps); BITMAP bm; HDC hdcMem =…
c++asked 9 years, 2 months ago Jhonas Boeno 162 -
0
votes1
answer45
viewsDebug c++ in Visual Studio
I installed Visual Studio C++ 2010 Express. I created a project using Win32 Console Application, added a New Iten C++ File(.cpp) to this project, but at the time of running the error appears:…
-
0
votes0
answers40
viewsCapture data from the Bus
Good afternoon. How do I capture data from the bus when it comes to video or images ? Any ideas ? Example: When I want to capture bus input data I can use Std::Cin, getline. But if I had to capture…
c++asked 8 years, 8 months ago Ten. Oliveira 33 -
0
votes1
answer141
viewsProblem with Iterator Map C++
the program for a URI exercise hangs (as in infinite loop) when the input (double) is different from an integer or decimal number that is not something with a middle (e.g.: 55.5). I have tried to…
-
0
votes0
answers55
viewsRetrieve data from another process
I wonder if there is some way in C++ to take some data (value) of a process, but without using a pointer to the memory, because when I try to use the Cheat engine, until I find the dynamic address,…
-
0
votes0
answers147
viewsHelp with Lexical Analyzer
Good evening everyone. I’m implementing a c/c++ lexical analysis, but I’m having a problem with the output. I was asked to leave the program with only 3 variables and 2 operands, plus 1 delimiter…
-
0
votes1
answer86
viewsConversion C to C++
Guys, does anyone know what this code means in c++? #include <iostream> #define MAX_C (10) using namespace std; int compar(const void *x, const void *y) { int a = *((int *) x); int b = *((int…
-
0
votes2
answers5472
viewsHow to create an android app using c++ only in Android Studio?
Just for learning purposes, is it possible to create an app using only c++(without JNI)? And if possible, what are the steps, have some example 'Helloword' somewhere? From what I know some things in…
-
0
votes1
answer228
viewsProblems with ã and õ in C++
Guys, I’m having a problem with special characters in C++. I watched some videos about printing special characters on the console, until then ok I can print everything except ã and õ. After several…
-
0
votes0
answers41
viewsRewind float numbers from a string
I have the following string: 0 0 0 0 1 1 0 3.56 1.5 Only the last two numbers are integer or decimal numbers, each can have several digits. How can I save only the last two numbers in 2 separate…
-
0
votes1
answer551
viewsCalculation of figures area
I may have something on the subject here, but I haven’t found it. I am new in the area and would like help to elaborate a C++ algorithm for detecting the area of a predetermined color in a figure.…
-
0
votes3
answers103
viewsC pointers, error calling the relocation function
I have the C code written below, whenever I want to invoke the function of an error that says: --/home/Amuel-o-cara/Documents/Data Structures and Algorithm/Class 13.04.16 Alocarmemoria/main.…
-
0
votes1
answer97
viewsHow to Link to boost library in codeblocks! (linux Fedora)
Hello, I downloaded the boost.tar file, extracted it, compiled it and installed it in my Fedora 23! But I can’t make codeblocks link to these new libraries. How do I link?
-
0
votes0
answers103
viewsProblem when listing text file data in c++
Good night to you all, I have to deliver a job in college , the same being done in C++. As it is the first time I come across this language , I have a problem in one of the part of the program.…
-
0
votes1
answer73
viewsMakefile wxWidgets
I’m trying to use wxWidgets to do a college project and I ended up trying to use Makefile out of curiosity, below the Makefile I’m using as an example for the project. Makefile CPP_FILES :=…
-
0
votes1
answer1207
viewsC++ How to call another cpp file in the script
I have two cpp files. One is the main, the other is a secondary that will open windows programs. So I include them both in the same folder. In the main file, I added: #include iapt2.cpp which is the…
c++asked 8 years, 6 months ago Luan Barbosa 31 -
0
votes1
answer113
viewsHow to include Sdl_image lib for my Solution in Visual Studio 2015?
I’m trying to create a C++ game with SDL2 for Windows Phone 8.1 I follow this tutorial https://hg.libsdl.org/SDL/raw-file/tip/docs/README-winrt.md and a game with only the SDL2/Winrt project (no SDL…
-
0
votes1
answer148
viewsSegmentation Fault when initializing Code Blocks in Fedora
Error presented: Try to migrate conf-Folder The Places Where the Configuration files and user-data files are stored have been changed to be more standard-conform. Now Moving "/root/.…
-
0
votes2
answers153
viewsWhy does it not read the string matrix?
I am creating a code that for now needs to read the name of N companies (whose N is given). I’m trying to enter the names but the program just doesn’t read and it’s the first time I try dynamic…
-
0
votes1
answer91
viewsHow to declare a global queue?
I want a queue to be declared globally. I have declared the queue as follows in my file . h: extern std::queue<SotpPacket*> reg; I want to access the queue in my file . cpp, but I’m not…
c++asked 8 years, 5 months ago Renan da Silva Alves 39 -
0
votes1
answer128
viewsError importing class C++
I am trying to use a library in my C++ project with CMAKE, the problem that the library is loading the System class, and not my class that has the same name only the namespace that changes. It is as…
c++asked 8 years, 5 months ago Pedro Soares 1,136 -
0
votes0
answers107
viewsError message: malloc: error for Object 0x7: Pointer being Freed was not allocated
My program is giving this error message: malloc: * error for Object 0x7: Pointer being Freed was not allocated * set a breakpoint in malloc_error_break to debug Would anyone know why? The code is…
c++asked 8 years, 10 months ago Helio Fuchigami 1 -
0
votes1
answer33
viewsstring.find(), what if I want to create something similar?
Guys, I’d like to know how these "things" work in which I don’t know the name, in the case string.find(), string.copy(), string.Rase(); All I know how to do is stringpick(string). Remembering that I…
-
0
votes1
answer77
viewsConvert 'const Std::string' to 'Std::string &'
I have a mistake and would like tips to fix it I have my Node struct inside the Dllist class: struct Node { Type m_data; Node *m_next, *m_prev; Node(Type& v, Node* _prev) : m_data(v),…
-
0
votes1
answer28
viewsQdateedit component only accepts dates from 1752
Hello, I need to register data with dates 1500 and 1600 but the Qdateedit component only accepts dates from 1752. Can you change the component? Is there any other component that replaces it? I tried…
-
0
votes1
answer533
viewsIndefinite reference in C++
I’m studying c++ and found a problem when working with object orientation, I followed some tutorials but it didn’t work. Bill. h #ifndef CONTA_H #define CONTA_H #include <string> using…
-
0
votes1
answer155
viewsError writing binary file using fwrite
Why this code snippet DataRootDir data = rootdir[i]; fwrite (data, sizeof(DataRootDir), 1, arq); always returns the error error: cannot convert 'DataRootDir' to 'const void*' for argument '1' to…
-
0
votes1
answer17
viewsCatch lower_bound from a Multiset in Indice 0 mode
Here comes the code: first = mult.lower_bound(c); last = mult.upper_bound(c); if (first == mult.end()) { printf("%d not found\n", c); } else { printf("%d found from %d to %d\n", c, first, last); }…
c++asked 8 years, 3 months ago Ícaro Dantas 1,088 -
0
votes1
answer75
viewsEnable variable spacing Code::Blocks
I love Code::Blocks, only that there is a problem, I wanted it to already space the instructions as soon as I put ';' the same as Visual Studio. Ex: for(int i=0;i<n;i++)`` >> ``for(int i =…
-
0
votes1
answer4109
viewsConverting char vector to string - C++
#include <iostream> #include <string> #include <vector> using namespace std; int main () { string vet[10], aux; std::vector<char> name; int count=0, sum=0; while…
-
0
votes1
answer81
viewsC++ problems with overloading Operator+ (Undefined Reference to 'Operator+(...))
I’m having trouble making the operator + overloading in C++. Does anyone have any idea what’s wrong? To perform Unit tests I am using googletest on Ubuntu. (wanted to do this to make the code…
-
0
votes1
answer74
viewsDoublyllist C++ // Insert value at index position (with iterator)
My insert function is correct, but I’m having memory Leak because when I debug, temp->prev->prev was pointing to nullptr instead of pointing to the rest of the list, when it has 3+ elements.…
-
0
votes0
answers27
viewsWhat is the difference between Casse obj; and Class* obj = new Class(); in C++?
I know that using Class obj; I’m storing obj in Stack and with Class* obj = new Class(); I’m storing in Heap. But in practice, what’s the difference?
-
0
votes1
answer85
viewsDefinitions of unget() and putback()
I looked for some definitions and so far what I know is that the unget() must return the last character and the putback() can return other than the last. But my doubt would be on the functioning. I…
-
0
votes1
answer134
viewsC++ smart pointers and functions
I am reading an article on msdn about smart pointers. In the article there is this example: class LargeObject { public: void DoSomething(){} }; void ProcessLargeObject(const LargeObject& lo){}…
-
0
votes1
answer244
viewsBuild error -lpthread
I am trying to compile a file. c, but whenever I call gcc filename. c, I have the following error: c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread…
-
0
votes0
answers156
viewsCreate a game standalone . exe in Visual Studio
I need to release a game but want to create a standalone . exe, because when VS finishes the compilation creates the . exe but together are the dll’s of the game, I wanted it to stay only the . exe…
-
0
votes1
answer319
viewsWarming - Source file not compiled
Every time I create a code of this error, being able to compile normally, but when I try to execute this occurs, how should I proceed?…
-
0
votes1
answer337
viewsUnderstand code C++/Assembly
I am studying a Node, and in this process I decided to help in the study migrate a system in c/c++ to Node, but I am not familiar with c/c++ and I appeared a piece of code that I am not able to…
-
0
votes1
answer59
viewsProgram having unexpected output
I’m having an unexpected output problem and can’t find the error in my code, the output in question is the errors of all sentences which are not "Dog walks." , a notorious observation is the fact…