Most voted "c++14" questions
C++14 is the standard C++ language approved on December 15, 2014. It replaces the previous C++11 by adding small extensions to the language. Use this tag for questions that refer to the C++14 standard. For general questions, use the C tag++.
Learn more…26 questions
Sort by count of
-
7
votes2
answers1064
viewsLambda functions in C++, when to use and what are the advantages?
When choosing to use a lambda function or a normal function, and what is the advantage of using a lambda function compared to a normal function? There is the call price of a function in a lambda…
-
6
votes2
answers142
views -
4
votes1
answer506
viewsVariable without initializing
I did a basic function of squaring (exercise of a book), and I use a variable named aux and the use to calculate the power value squared, but the compiler claims that aux is not initialized, I would…
-
4
votes1
answer687
viewsWhat are the most common C++14 compilers on Linux?
What are the most common free compilers on Linux to compile C++14? " Most common" in the sense of most used and available in several distributions. I am using CENTOS and need to compile code that…
-
3
votes1
answer49
viewsLogical error no for
Hi guys I’m trying to make a controlled loop for my program, so far it’s running normal only in the first round, in the second repeat it jumps the first pass of the go and starts in the second…
-
3
votes1
answer607
viewsDoubt with Random in c++14 and 17
I was searching the Internet for how to do pseudo-random numbers in c++ and all the examples I found were with the srand function, but in some places people said srand is from c, and c++ already has…
-
3
votes1
answer46
viewsAre there problems in declaring many noexcept functions?
I see a lot of code in C++14/C++17 where the programmer is sure that the function will make an exception, but does not report this pro compiler, perhaps because it may cause some problem when…
-
2
votes1
answer73
views -
2
votes1
answer90
viewsHeader files in C++ using more than once
I am developing a cross-platform project (Windows - Linux - Macos). During its development and while generating documentation (via Doxygen) I realized that there are many files *.h to be called by…
-
2
votes1
answer154
viewsSort from minor to major in priority_queue unpacking by second element, is it possible?
I’m studying priority_queue and a question has arisen, if I want to insert in the priority queue a pair of elements, how do I so that the queue shows the element with the smallest number and if it…
-
1
votes1
answer325
viewsProblem with While condition in C++
Hello, I’m studying from Bjarne’s book "PROGRAMMING Principles and Pratice Using C++". I’m trying to make Drill number one chapter four. The exercise tells you to make a program that consists of a…
-
1
votes1
answer815
viewsI’m having a problem with Dev C++ in displaying members of a class
To be more exact, when I press "." after some object, like I declare a vector: vector<int>Random; So far so good, so when I start typing: Random.push_back(); Dev c++ doesn’t help me complete,…
-
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
answer133
viewsWhat is the difference of declaring a variable as constexpr const and constexpr?
What is the difference of declaring a constant as constexpr const for only one constexpr? constexpr const float max_height = 3.0f; constexpr float max_height = 3.0f;…
-
1
votes1
answer35
viewsReturning multiple auto variable types in C++14
I created a class, which has 4 attributes int valInt, float valFloat, double valDouble, bool valBool, and a method called getValue() of the auto type that returns the value according to another…
-
0
votes1
answer292
viewsProblem with vector function in C++
Hello, I’m trying to make a matrix calculator and my idea would be that the user entered with the number of rows, columns and soon after with the matrix elements, the problem is that when I write…
-
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
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
answer37
viewsDoubt - Let the user choose which line to delete
I am developing a small CRUD in the C++ language, using Mysql c++ Connector 8.0.17, and I came across this question: void Management::excluir(){ std::cout << std::endl << "…
-
0
votes1
answer26
viewsProblem changing characters of an array
I have a problem where given a 10x10 matrix, it has to be filled with asterisk characters and the’t'. In this matrix, ONLY the characters with the coordinates that have t' and that are neighboring…
-
-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
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
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…
-
-1
votes1
answer45
viewsIssue of matrices
Well, the question may be that for what Write an algorithm that reads an array A(5,2) and write it. Check, below, which elements of To are repeated and how many times each is repeated. Write each…
-
-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…