Category "c++"

Append to registry without expanding variables

I'll just start off by saying that I'm by no means an expert in C++, so any pointers/tips are greatly appreciated. I'm having some difficulties reading and writ

Single overloaded constructor

I am not sure how to ask this question. I did my research but I couldn't find my question. For example, I have 3 variables which are FirstName, Surname and Emai

Can I use Xcode font on QtCreator?

After using QtCreator for a long time on Windows I was comfortable with it. But now I'm using it on macOS too and it feels different. I noticed default font is

How to prevent libcurl(c++) form downloading binary data?

I am making a web crawler and I have the following code but the problem is that it also downloads binary data and I don't want that to happen. How do I prevent

In C++ printing even, odd and prime number by using for loop and typeinfo method [closed]

I am trying to print even, odd and prime numbers in one program b/w 1 to 1Lac. I have already printed even and odd numbers but don't how to pr

How to check a type has constexpr constructor

I want my class use another implementation for types don't have constexpr constructor. like this: template <typename A> class foo { public: // if A h

Getting an HTTP response status code of 0 and empty message using C++ curl library libCPR

I'm using libcpr to send a GET request. cpr::Response r = cpr::Get( cpr::Url{target.str()}, cpr::Header{header}); For debugging, I

How to join two Bezier curve using C1 continuity?

How to draw Two Cubic Bezier Curve using 8 Points The last point of the first curve will be the starting point of second curve What I am doing wrong ?? Please H

Add and subtract integers of arbitrary size

I am tasked to implement from scratch addition and subtraction of signed integers of arbitrary size. Such an integer is stored in an array of 64-bit unsigned in

Why can’t my code find the second smallest elements array?

int smallindex = 0; int secsmallindex = 0; I put the lines above into gobalslope. The rest of the code: #include <iostream> using namespace std; int ma

Copy information from file to variables

#include <iostream> #include <stdio.h> using namespace std; struct Table{ char fullname [100]; int group; int firstMarks[5]; int se

How to pass template variadic arguments by reference in C++?

I want to get repeated inputs, therefore I made the function to get inputs with variety of types. template <typename InputType> void get_inputs(const std:

Code exiting when Dynamic Array of class allocated

I am trying to dynamically allocate an array and whenever it gets to the part where it dynamically allocates the program exits. I would rather not use vectors a

Passing a pointer to a class member function as a parameter

I have written a small program where I am trying to pass a pointer to member function of a class to another function. Can you please help me and where I am goin

What problem do C++20 concepts really solve? [duplicate]

I'm trying to understand what problems C++20 concepts are solving and how exactly they are helpful to the end user. I understand that it helps

Array gives different values in main() and in a function() [closed]

I am trying to store a 1d array that stores random numbers into another 2d array. So as you can see, I am trying to store the passed random ar

declare and using enum class and using in one statement

When using scoped enums I stumbled over some syntax which is accepted by Microsoft, but not by clang or gcc: using enum class Color { RED, GREEN, BLUE }; (ht

How template deduce const pointer type?

I've tried following codes in cppinsights: #include <iostream> #include <string> #include <type_traits> #include <vector> template<t

(esp 32) http.GET() is so slow

I want to get data from REST API by an esp32 and turning on and off LED lights(GPIO 26 and 27). Here is my code : #include <HTTPClient.h> #include <Ard

C++: Undefined reference to Casadi

Here is my source code #include <casadi/casadi.hpp> int main(int argc, char** argv) { casadi::SX x = casadi::SX::sym("x"); return 0; } I use gcc v