Category "c++"

c++ constexpr concatenate char*

Context: In my company we generate a lot of types based on IDL files. Some of the types require special logic so they are handcoded but follow the same pattern

How multiple lines logging works?

I am working on a C++ program. I saw multiple lines of logs in this pattern in one of the files: #include <iostream> using namespace std; int main() {

How to avoid the need to specify deleter for std::shared_ptr every time it's constructed or reset?

std::unique_ptr has 2 template parameters, the second of which is the deleter to be used. Thanks to this fact, one can easily alias a unique_ptr to a type, whic

How do I set a custom cursor when the mouse is over a certain control?

I want to change the cursor when the mouse is over a certain control. I'm having the png of my cursor. How do I achieve it in C++ ? I tried like this as descri

Qt C++ QString to QByteArray Conversion

I have created an encrypt/decrypt program, when encrypting I store the encrypted QByteArray in a text file. When trying to decrypt I retrieved it and then put

Spurious wakeup with atomics and condition_variables

std::atomic<T> and std::condition_variable both have member wait and notify_one functions. In some applications, programmers may have a choice between usi

how to make a code::blocks project for caffe

I like to have a code::blocks project out of the sources of the caffe framework. I checked out the whole repository from caffe and made the makefile.config and

not recognized as a supported file format ECW gdal api

I'm trying to use ECW files in my application. I've built GDAL Library whit this command: ./configure --with-ecw:/usr/local/hexagon after completion of build p

Arduino C++ - call registers by arrays

I am using a Teensy with Teensyduino to control several stepper motors. This requires writing to timer value registers, and there are 4 needed for each stepper

Generating a call graph with clang's -dot-callgraph with multiple cpp files, and a sed command

I tried Doxygen, but it was a bit slow, and it generated a lot of irrelevant individual dot files, so I'm pursuing the clang way to generate a call graph. This

Implementing a client connection function that waits for the server in capnproto

I'm trying to implement in capnproto something like boost's connect function which blocks and retries until the server is up, or basic_socket::async_connect tha

ffmpeg H264 - How to add user unregistered SEI Message while encoding stream

I'm working on an application where I need to insert some user unregistered SEI data in every frame before encoding it. I can't seem to find any API to add the

Seam Carving an image using Dijkstra algorithm in C++

I am trying to implement Seam carving using Dijkstra's algorithm. So far, I have converted the image to grayscale and using a 2D array, I've found out the ene

Count how many iterations of deletion until array is ordered

I'm trying to write a program whose input is an array of integers, and its size. This code has to delete each element which is smaller than the element to the l

LateBinding with dynamic memory

I have Base and Derive class at the below which related to polymorphism (Latebinding) : class Base { .... }; class Derive:public Base { .... }; int main() {

problems with computing normal for organized point cloud

Now I want using PCA method to compute normal for the organized point cloud transformed from the depth image.Here is what I do: pcl::NormalEstimation<pcl::P

No instance of overloaded function matches argument list.

I'm working on a project for class, but keep getting the error: no instance of overloaded function matches argument list. It is referencing my String classes. W

problems with computing normal for organized point cloud

Now I want using PCA method to compute normal for the organized point cloud transformed from the depth image.Here is what I do: pcl::NormalEstimation<pcl::P

Serving HTML as C array from Arduino code - String size limit problem

I've been working on a HTML / websocket server on a Wiznet W5100S-EVB-Pico, programmed in the Arduino IDE. It all worked fine up until now but I'm running into,

Will C++17 allow forward declaration of nested classes?

Not sure where to ask (feel free to close this if it is an inappropriate question) but I have not found anything on this specifically in C++17 proposals, neithe