Most voted "c++11" questions
C++11 is the standard C++ language approved in 2011. It replaces the previous C++03, adding several novelties to the language, such as Lambdas, auto deduction of variable types (`auto`) and threads.
Learn more…88 questions
Sort by count of
-
1
votes0
answers75
viewsRuntime Error URI1270
I made a code in C++ to solve the problem URI 1270 Fiber Optics. I did several simulations and the code solves the problem but in the URI environment, the answer is "Runtime Error". Can someone help…
-
1
votes0
answers125
viewshow to traverse a pointer to set in c++?
Hi, I’m implementing Kruskal’s algorithm, but I can’t navigate one set< No*>* to test the FIND_SET method, which is a set< No*>* how should I proceed? (in the rest of the code I walked…
-
1
votes1
answer143
views"void *Reader(void *i)" What is the equivalent in C++?
I am studying Operating System and I have an exercise to do in C++ and I am with dual (the book brings only in Java), I have to implement a classic problem of reader and writer using semaphores and…
-
1
votes1
answer2029
viewsError "No match for Operator <<" in C++
I made this code but I have no idea why this error : "No match for 'Operator <<' In the part where I display the user’s reply... (Remembering that Namemouth is a class and Date is also...)…
-
1
votes1
answer178
viewsTake the result of an expression in c++
I’m almost done with my expression interpreter. But I have no idea how to do the most important part : The result I’d learn a lot from any idea. main.cpp #include <string> #include…
-
1
votes2
answers218
viewsHow to go through a set with entered data?
I have a little program that inserts a few integers into a set, and removes when I find the same one, after doing this, I need to bring out all the integers that are still inside the set, but I’m…
-
1
votes1
answer151
viewsC++. Generic class receiving lambda and struct function
Expensive, I’m trying to do some things in C++, but I’m still starting both in language and in the functional paradigm. What I need is to insert a function lambda in a pair. The first member of pair…
-
0
votes1
answer84
viewsHow to listen to events without opening a window?
I’m doing a simple project of console people who are going to make Keyboard hooking, but I don’t want you to open the SFML Opengl window. There is a way to listen to SFML events without opening a…
-
0
votes2
answers112
viewsReactivate form to closure of other
I have a form main and from this form I click on a button and open another form, So when I open this other form I disable the main one, so that’s okay, so I wanted when the user closes the second…
-
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
answer1173
viewsHow to mount an array with Std::array and Std::vector in C++11?
How to mount an array with Std::array and Std::vector in C++11 ? What is the difference between the two architectures? How to scan this array with C++11?
-
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…
-
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
votes0
answers209
viewsCall c# function from within a c++ dll
Situation: I have a 3-layer project: One for data, one for C# and one for C++. The c++ layer is made using support for clr (Common Language Runtime Support (/clr)). But I use it as wrapper between…
-
0
votes1
answer376
viewsC++ - Read the name of a directory’s files
I am making a program to read all files from a folder, and clear the name of them ( take any accent ). I wonder if there is a standard library to work with directories(Read). I am using Windows 10,…
c++11asked 5 years, 6 months ago Kaue Alves 303 -
0
votes1
answer84
viewsProblem zeroing out a game score
Well, I read Bjarne’s book on programming and I’m learning programming there, I’m in chapter 5 which is about mistakes, at the end of the chapter there’s a list of exercises for me to do, I came…
-
0
votes1
answer332
viewsDoubt how to take a JSON, turn it into an object
I have a little doubt about a json module in c++, I wanted to know if there is any way to take a json that already exists and increment more fields using c++, json data = json::parse(getData());…
-
0
votes1
answer197
viewspush_back in Vector 2D, emitting error "no matching Function for call"
I’m a beginner in C++ programming, so I apologize in advance. As this question answered here, it is possible to use std::vector, 2D (grid) with push_back() directly (variavel[indice].push_back(...))…
-
0
votes1
answer53
viewsis repeating only once
Code: #include <iomanip> #include <iostream> int main() { auto time = std::time(nullptr); std::string…
-
0
votes1
answer28
viewsHow to check the state of a Gtk::Radiomenuitem object?
I am building a dynamic menu using Gtkmm. The menu is built as follows: Gtk::RadioButtonGroup appRadioGroup; bool groupInitialized = false; Gtk::Menu *driverSubMenu = Gtk::manage(new Gtk::Menu);…
-
0
votes3
answers95
viewsIdentify a specific word in a C++ String, is there a function ready for that? Or just in the nail itself?
Hello, I’m getting a series of strings(lines) from a . txt file and putting them into a vector. But there’s a problem, strings come with an unwanted start, example: Depende: lsb-release Depende:…
-
0
votes1
answer72
viewsHow to assign split lines(Strings) of a vector to an element of another vector. Ex: v[lineAntiga][elementLinhaAntiga]
#include <iostream> #include <vector> #include <string> /*Função para fazer split*/ std::vector<std::string> split(std::string s, char c) { std::string buff{""};…
-
0
votes1
answer115
viewsError with Template
Please, could you help me!? The errors are for all the headers of the.cpp stack file that refers to.h. Involves using Templates. Battery code. h: #ifndef PILHA_H #define PILHA_H #include…
-
0
votes1
answer322
viewsHow to test the execution time of a code in Visual Studio 2017?
I’m trying to test the execution time of a code, but I’m always getting incorrect values, the first test will always be the one with the worst time. And most of the time the second test is always 0.…
-
0
votes0
answers185
viewsCreate a TAD to represent a data
I have the following task: Create a TAD (struct) to represent a Circumference and then check which of the read circumferences intersect between them. I need to store four basic data, id, x, y and…
-
0
votes0
answers87
viewsDoubt - Map operation in C++
In order to compare different pairs of shoes I created a map, the first int represents size and the char represents whether it is for the left or right foot ('e' or’d'). N represents the number of…
-
0
votes3
answers2036
viewsError of Segmentation fault (dumped core)
Good morning to you all, as you are? I have a problem to solve in C language++: "Encode, in C, a vector addition program. The vector size N must be a command line argument in the call to the…
-
0
votes2
answers942
viewsHow to make my function Len() return the size of Std::string, vector and const char *?
My job len() in C++ can return the size of std::string and of std::vector<std::string> but cannot return the size of const char *, 'Cause for that or I’d have to use strlen() or convert const…
-
0
votes1
answer105
viewsConceptual error about functions in C++!
good morning! I am a programmer beginner in C++, and I am certainly making a conceptual mistake when creating functions, which I could not detect in any forum and material about C++. I have the…
-
0
votes0
answers51
viewsQmediaplayer stops or skips next when removing media from playlist
As the title itself says, the problem lies in removing a media from the playlist, but precisely in removing a media that the content is lower than that of the media playing at the time. I’m already…
-
0
votes0
answers22
viewsWinapi - Receive the process name and PID in C++
I am working on Windows processes, detect process, receive image name (Program) and your PID using Winapi. #include <windows.h> #include <tlhelp32.h> #include <tchar.h> #include…
-
-1
votes1
answer119
viewsI’m not able to use libcurl C++
Guys, I can’t get my libcurl on! Could someone give me a hand? teach me how to compile this correctly! Because I am following all the steps that come in a doc together with the project itself.…
-
-1
votes2
answers73
viewsDynamic lease in C++
Good afternoon. I would like to know how to allocate a string dynamically in C without asking the user the size of the string. Just putting it to write the string.
-
-1
votes1
answer146
viewsProgram does not execute when filling vector with non-repeated random numbers in C
I’m trying to get random numbers to be generated and fill in a vector in a separate function, but the program doesn’t run and crash if I put a high number, and not as high as 50 or 100. Below…
-
-1
votes1
answer45
viewsDoubt in the use of the to_string function
In an exercise that I’m doing, it was proposed to read two numbers, an integer and a real, and count how many digits they have. Entry and exit should be like this: Entre com o numero inteiro: 2345…
-
-1
votes1
answer149
viewsVisual Studio Transfer Control bypasses the startup of:
switch (option) { case 1: int var; std::vector<int>v(size); std::list<int>l; std::cout << "Digite os elementos do container (vector): "; for (int i = 0; i < size; i++) {…
-
-1
votes2
answers58
viewsHow to return different structures in a function with a value defined in Runtime?
Hello, I am working on a project for Windows that has a structure (of Windows itself) that changes according to the architecture of the system (x86/x64), how to return the correct structure for a…
-
-2
votes1
answer27
viewsProblem with a game program (Rooster game in c++)
I’m trying to develop the game of the rooster in c++, but when I try to compile the program I get the same mistake constantly (I’m still new in this world of programming so I’m not sure where I’m…