Category "c++"

Object not declared in this scope error in cpp?

I'm getting error SPIGtestMain.cpp:"MockObj not declared in this scope" though I've declared it globally in with extern keyword in SPIGtestMain.cpp file. SPIG

Infinite loop in a C++ constructor [closed]

I've got this class in c++ and I'm having trouble with the second constructor: for some unknown reason, the IDE is acusing an infinite loop. I

OpenMP array initialization impact

I am working in parallel with OpenMP on an array (working part). If I initialize the array in parallel before, then my working part takes 18 ms. If I initialize

Which libtorch libraries do I need to distribute?

A new DLL in my application requires the C++ libtorch API. A fellow developer has downloaded it and created a C++ DLL that uses it. However the entire thi

How to correctly define a dispatching function in C++?

I have the following problem: I receive commands through an AF_UNIX socket (no problems about network byte ordering). the first word in packet is the command, t

C++ loop using queue- error: ‘begin’ was not declared in this scope

I am not very familiar with C++ pointer and address. I think I have an error related to the pointers. The program consists of different objects of objects, I

Unexpected output when printing to 0xb8000 - osdev

I'm developing a kernel and when I try to print to video memory(0xb8000) I get weird characters when I run it. What I have tried: I have tried to find some answ

c++ find similar string in map/vector

Is there a c ++ function that finds all string occurrences above the map / vector that differ by max in 1 (generally n) character? Possibly some procedure that

Win32 application not finding icon for window

I created a icon as a resource I checked explorer and it works just fine, my exe now has that icon Next, I used hIcon to set the icon of my window but it says

Specialize a visitor for types under a namespace

I have a variant which can contain 8 different types, some of them under a particular namespace std::variant<T0, T1, T2, ns::T0, ns::T1, ns::T2> v; There

How do I make this function more efficient?

I'm trying to create a tiny database that contains a list of people, their names, ID, and their income as time passed on. Using this database I'd like to find t

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