Category "c++"

Which STL data structures with an incomplete type stored can be used as a class member?

As far as I know, since C++17 some STL data structures may "exist" with an incomplete type as the template parameter which describes the type stored. For exampl

Is most vexing parse a formally defined concept

I was reading an SO post where one user made the following comment: Also note that ArrTest<int> ar(); uses most vexing parse. But another user said the

Error: declaration of ‘freefunc’ shadows a global declaration

While building application using openssl 1.1.1d I am getting below error, I know C++ but not an expert. Spent lot of time but still did not get any clue. Can s

Can substitute PyCharm Professional for CLion - primarily for python

My favourite editor by far is PyCharm, mainly because I am most comfortable with Python. I am subscribed to the professional package, but I am interested in pi

Inheritance and std::shared_ptr in Cython

Suppose I have the following simple example of C++ inheritance in file.h: class Base {}; class Derived : public Base {}; Then, the following code compiles; tha

Compatibility issues with Oracle OCCI and g++ 7.1

I am trying to create a C++ application with OCCI (versions 11,12,18, all lead to the same issue explained below) using gcc 7.1. The application below compiles

How to save c++ code file using visual code?

I downloaded the C++ extension of Visual Studio. How do I save it and how do I open it to see my code? Usually, with HTML, I save as .html and when I open the f

How to save c++ code file using visual code?

I downloaded the C++ extension of Visual Studio. How do I save it and how do I open it to see my code? Usually, with HTML, I save as .html and when I open the f

nullptr crash in UE5, works perfectly fine with a different component

I apologize for the long post, I tried my best to remove as much code while providing what I think is relevant. I am using URotateObject in another C++ componen

Template arguments can't be deduced for shared_ptr of class derived from templated base

I'm running into a case where I thought that the compiler would obviously be able to do template argument deduction, but apparently can't. I'd like to know why

How to setup VS Code for C++ with clangd support?

Disclaimer: I am totally knew to VS Code, so, please, be gentle with me. :-) I am trying to set up VS Code for C++. However, I explicitly want to set it up so

How to send a cv::Mat to python over shared memory?

I have a c++ application that sends data through to a python function over shared memory. This works great using ctypes in Python such as doubles and floats. No

How to get the OpenCV image from Python and use it in C++ in pybind11?

I'm trying to figure out how it is possible to receive an OpenCV image from a Python in C++. I'm trying to send a callback function, from C++ to my Python modul

What does this error mean ? warning: null passed to a callee that requires a non-null argument [-Wnonnull]

I am not sure why I get this error or what it means ? I am trying to run a HistPlotter.C file to create histograms. However I get an error that does not make it

how does copyTo in opencv c++ works?

I have gone through the below snippet and was wondering how copyTo() in opencv function work. // Make a copy Mat faceWithGlassesNaive1 = faceImage.clone();

PostgreSQL libpq windows 10 CMake missing PostgreSQL_LIBRARY

I'm rying to setup a CMake project under windows 10 using PostgreSQL. When I try to find_package find_package(PostgreSQL REQUIRED) I get the following error

How do I avoid creating a temporary vector in C++?

In the following minimal example, v1 and v2 and slices of vector v and these slices are elements of other vector vv. #include<vector> int main(){ std::v

Virtual Method not calling derived class method (only calling base class) C++

My base class detect() and collect() methods are the only ones being called. I'm trying to get the derived class methods of these to be printed instead. I belie

Alias Test in c++?

My professor was going through slides and went across "alias test," saying we should all know what this is, so he will not explain it. I have never heard of thi

Query RTC and NTP time in Linux?

The way the Linux kernel handle time is somewhat complicated as it uses different source of time, and regularly resynchronize everything. There are command-line