Category "c++"

Passing an rvalue to a function

I read a lot of information about rvalue links, I understood everything, but I met this example: template<class T, class Arg> T* make_raw_ptr(Arg &&am

Why am I getting QWindowsWindow::setGeometry: Unable to set geometry warning with Qt 5.12.0

I migrated some code from Qt 5.6.0 to 5.12.0. Suprisingly, I'm getting lots of warnings related to QWindowsWindow::setGeometry. Whenever a dialog is shown on to

Using one loop vs two loops

I was reading this blog :- https://developerinsider.co/why-is-one-loop-so-much-slower-than-two-loops/. And I decided to check it out using C++ and Xcode. So, I

Something in Visual Studio is constantly changing my c++ header Item Type assignments...how to track down the source?

I have a MSVS 2019 C++ project which includes Qt source files that are processed by the Qt moc. In order for my header files (and thus, class declarations) to b

How to delay in c++?

I am working on a rehabilitation application that relies on four ARuco markers,i need to draw on the four markers in the exercise sequence i.e. the object appea

Rationale Behind PCL `shared_ptr` Interfaces

Many PCL interfaces accept only shared_ptr<T> arguments (e.g. boost::shared_ptr< PointCloud>). [Aside: that is it boost::shared_ptr and not std::sha

Can ETL be used with Atmel Studio?

The Embedded Template Library provides the data structures of the STL without using dynamic allocation, to be used in embedded development. I'm experimenting wi

Move an object with a given speed

Here's an example of an if-statement where depending on what keystroke is pressed it will move to a certain position. I have also googled the "move" command in

Printing a message from a base class function through the operator <<

This is the header file with class Rectangle that inherits from class Shape: class Rectangle: public Shape { private: double width; double height;

Running C++ exe file in PowerShell

I'm usually not programming in C++, but this time I had to and I've got a problem executing my code in PowerShell (which I have never done before). The program

How do multiple buffers for attributes work in openGL (ES) shaders and C++ api

I have the proverbial cube sample and have been writing some code to test it all and learn more about shaders. My question is about how multiple buffers are ass

Segmentation fault (core dumped) in image pyramid construction

I am looking at the source code of orb-slam2. I see that the source code of feature extraction written by the author contains a piece of code for building an im

Managing 'Security Settings' in Active Directory GPO using C++

Need help with modify 'Security Settings' in AD's GPO. The 'Administrative template' settings are stored in corresponding ADMX files. I'm able to change these

Mesh getting cut off

I'm using DirectX 11. I'm trying to draw a Cube mesh to the screen but the bottom half is getting cut off. If I move the camera up/down the bottom half is still

How can I propagate const when returning a std::vector<int*> from a const method?

Lets show it in an example where we have a Data class with primary data, some kind of index that points to the primary data, and we also need to expose a const

Is it possible to accelerate clang-tidy using ccache or similar?

Since employing ccache on our CI server, we find that the bottleneck in terms of build time is now our static analysis pass, that uses clang-tidy, among other t

How to use F.getValueSymbolTable()

I wanna get all the local variables in a function. void getLocalVariables(Function &F) { ValueSymbolTable *vst = F.getValueSymbolTable(); for (auto vs :

Get PDF images in an array using PDFIUM to edit them

I am trying to write down a method to get all PDF images from a FPDF_DOCUMENT object to perform actions on them and return back theFPDF_DOCUMENT with the images

How to use CPPFlow with giving a .txt as input

I recently used cppflow on VS 2019 on Windows 10. My original data is data in 4 columns per row. I want to use neural network to classify precipitation particle

Can I use UnrealEngine with C++ on Mac without Xcode

I am new to Unreal Engine as well as game development. I am using mac (since this laptop is not my personal usage, I have a limitation of using any application