Category "c++"

How to instruct c++ compiler to automatically use SIMD instructions? [duplicate]

Let's say I have a generic c++ code based on c++ standard. This code is meant to run on windows 64 bit and Linux 64 bit. Can we direct the com

How can I use ranges max to find the closest point to another given point?

So I've created a structure called point that will consist of two integers. Then, created a function called closest() that's going to take an std::vector co

Deleting a pointer to a pointer causes "Invalid address specified to RtlValidateHeap" error

I was solving a simple math question which needs to add solutions continuouslly to the answer set. So I designed a class with a pointer to a pointer in it. When

Bounds of mesh are scaled by its world postion

I am trying to get the correct world postion and size of the bounds for a mesh, however the size of the bounds are scaled by the position of the mesh. The bound

Make can't find boost header in docker container

I'm trying to build a simple client server connection in docker with boost sockets. When I compile the files on ubuntu without docker it works. But when I try r

getting "Permission denied" while reading from file using custom C++ build in sublime text 4

I use sublime text 4 on macOS. I have a custom C++ build to read from a input.txt file in current file path. but when I run my custom build, it shows bash: /Us

normalize image with opencv in c++?

I have a TfLite model that takes a standardized float32 image as an input, the pixel range should convert from the [0~255] to [-1~1] I wrote a demo function but

How do we call c++ application from web on client side on linux

For example, a client has a c++ application, and trying to access web application on the browser. But the web application needs to run this application. I don't

How do we call c++ application from web on client side on linux

For example, a client has a c++ application, and trying to access web application on the browser. But the web application needs to run this application. I don't

How to use ceres-solver to solve high dimensional non-linear problem?

     I need to solve the optimization problem: . A and b are known. I use Zero to represent A and b to facilate the expression in the follow

C++ Override a pure virtual method with reference to an abstract class as a parameter by method that takes non abstract sub-class as parameter

I have the following code: struct A{ f()=0; }; struct Aa : A{ f(){} }; struct B{ void foo(A&)=0; }; struct Bb : B{ void foo(Aa&); }; Right now I

How to use ceres-solver to solve high dimensional non-linear problem?

     I need to solve the optimization problem: . A and b are known. I use Zero to represent A and b to facilate the expression in the follow

Mac Terminal Wont Open When I'm Using QT Creator Anymore

Before I updated both QT and Xcode on my mac, my computer just stopped opening up the terminal when I went to run my code. It had worked for months and is still

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

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