Category "c++"

Hikvision IP PTZ camera control with LabVIEW

I want to control hikvision camera with LabVIEW. By using the "NET_DVR_RealPlay_V30" function of the "HCNETSDK.dll" file compiled with C/C++ with "Call Library

Problem with deprecated conversion from cv::mat to IplImage

I know there were already questions like this in the past but all the answers seem not to work anymore since some functions are deprecated so I hope you can hel

How to watch instance method operator() result in VSCode C++?

My code is as follows: class Foo{ public: int operator()(int i) { return 1; } int operator++(int i) { return 1; } }

Need help to solve error in drawing histogram in root

this is my code I am checked it many times but it gives me an error when I run it. TFile *f=new TFile("hist.root"); TH1F *h = (TH1F*)f->Get("Phi_mu"

Why are the results of the optimization on aliasing different for char* and std::string&?

void f1(int* count, char* str) { for (int i = 0; i < *count; ++i) str[i] = 0; } void f2(int* count, char8_t* str) { for (int i = 0; i < *count; ++i)

C++: array<> too many initializers

The following code is returning the compilation error below. I'm stuck understanding how there are too many initializers. This code works using vector<X>

grpc can't find protobuf library

I went over the grpc installation and finished building and installation. Now when I try to: find_package(gRPC CONFIG REQUIRED) I get CMake Error at CMakeLi

Retrieve always latest messages from Kafka on reconnection

I'm writing a piece of code that needs to read hundreds of messages from Kafka each few milliseconds. I'm using C++ and librdkafka. When my program stops and th

Video Lagging while Object Detection on C++

There is an object detection pre-trained model i.e. Yolov3/v4-tiny, when the algorithm is implemented in python, everything looked good, there is no lag while p

Redirect stdout from Executable Custom Action to MSI log

I have a Custom Action that runs an executable within an msi installer package. The exe is compiled as a console application and stdouts necessary info. I want

Error: "cannot bind packed field" while inserting data into std::map using insert function

Can somebody tell me the difference between #pragma pack(push,1) and __attribute__((packed))? I am getting a compilation error if I use second type of struct pa

How to make a "xoxo" console pattern in C++

How to make like this? I want to try to make it. For example, I have an input whose contents must be odd input = n > 0; n = odd numbers; such as N = 1, the

gSoap error : xlocale.h No such file or directory

I am trying to create C++ soap webservice client in Windows 7. I am using gSoap and I followed gSoap tutorial. first and second commands worked but c++ -o ma

conan system_requirements auto install

While installing xorg with conan install .. command, system requirements are checked in conan receipe using pkg-config tool. Each missing system package raises

conan system_requirements auto install

While installing xorg with conan install .. command, system requirements are checked in conan receipe using pkg-config tool. Each missing system package raises

How to, given UV on a triangle, find XYZ?

I have a triangle, each point of which is defined by a position (X,Y,Z) and a UV coordinate (U,V): struct Vertex { Vector mPos; Point mUV; inline Ve

What are monadic bind and monadic return for C++23 optional?

C++23 std::optional is finally getting some very useful additions. Since my knowledge of FP is very primitive I am wondering what is the syntax for the followin

When calling the function this error [Error] incompatible types in assignment of 'char' to 'char [40]'

I am returning the *res (which is value resultant string after concatenating strings) in the function. When I call this function and store the result in the ch

How to stop long operation on QThread?

I've made some research but I couldn't find the answer to why my solution is not working. But to the point. I've got QWidget as a separate dialog in my app. I'm

Parts of a structure in C++ [closed]

Here is a code of a structure. On that there is a BSTree function included on the structure. I am stuck because I do not understand how a func