Category "c++"

Basler Pylon camera API

In the c++ documentation for the pylon API, they use a loop to display the grabbed images. This code works fine: //Basler-Pylon example main() { CInstan

How to Fix: Error: Segmentation Violation and IncludePath Needs to be Updated from Debugger

I am working with ROOT and have ROOT installed in my computer. I am writing my code using Visual Studio. In my code I have the following header files: #include

Private compile-time -> run-time adapter. Strange compilation error

Basically, this code fails with a very strange error: <source>:75:29: error: cannot convert 'get_view<main()::<unnamed struct>, run_time::data_vi

What is the best way to pass parameters to a callback function? (C/C++) [closed]

I'm learning SDL right now and I'm trying to use timer callback function. The function SDL_AddTimer() offer me only one argument to pass throu

LINK Error when trying to use OpenSSL evp aes 256 c++

i have a lot of LINK error when i'm trying to use the evp aes encryption template code from OpenSSL documentation : https://wiki.openssl.org/index.php/EVP_Symme

Codeblocks 16-bit message

enter image description hereI'm new in Codeblocks and programming world. ( Unsupported 16-Bit Application The program or feature "\??C:\Users\Hossen\Desktop\C

Creating folders in C++

I have recently started working in C++ and came across this situation when I have to create a directory while executing my code. The code is working fine when I

Why does the use of `std::aligned_storage` allegedly cause UB due to it failing to "provide storage"?

Inspired by: Why is std::aligned_storage to be deprecated in C++23 and what to use instead? The linked proposal P1413R3 (that deprecates std::aligned_storage) s

Prevent clang tidy to report warnings on Boost Test headers

I have a Cmake project that uses Boost.UnitTest for testing. When I do static analysis with clang-tidy it reports some warnings from the Boost.UnitTest headers.

Changing color within a specific area with opencv using c++

I would like to know if there's a simple way to change a color, say from a shade of grey to white, within an area of interest that would be determined from the

Linking issues "relocation against `g_GIT_SHA1' in read-only section `.text'" and "undefined reference to `g_GIT_SHA1'"

I was trying to follow the procedure in this answer https://stackoverflow.com/a/4318642 with a test: CMakeFile.txt #cmake version setup cmake_minimum_required(V

Tried to implement Leetcode's FizzBuzz multithreading question from scratch. Getting "libc++abi.dylib: terminating" error

I started learning multithreading a few days ago because of a coming internship interview. I learned it and tried to solve Leetcode's FizzBuzz multithreading qu

Tried to implement Leetcode's FizzBuzz multithreading question from scratch. Getting "libc++abi.dylib: terminating" error

I started learning multithreading a few days ago because of a coming internship interview. I learned it and tried to solve Leetcode's FizzBuzz multithreading qu

Qt: Animating QPixmap

The answer code is located here (https://stackoverflow.com/a/50550471/4962676):https://github.com/eyllanesc/stackoverflow/tree/master/50550089 The answer was m

How can I make a list that can be accesed by other classes?

I'm trying to make a project using the standard std::list. There is a list of names that have to be accessed by multiple classes. The list has to be inside a cl

How to make a templated parameter to match the function-signature of an outer templated type

Imagine I've got sth. like this: template<typename Signature> struct Callable { template<typename FnType> requires std::convertible_to&l

Can anyone explain how to use OpenACC in GCC?

I am using WSL Ubuntu. And use GCC to compile my C++ code. I am trying to use OpenACC to parallelize my code. I heard that I can use OpenACC with GCC. So after

I can`t call the bool function in c++ (closed)

Hey guys please help me on this I have tried calling my bool function in my main func but it wont even show the first cout of program and the compiler terminate

how can I store the uid of my rfid card in a string?

I am a big noob at C++ and arduino, but that doesn't stop me from attempting cool projects. I have an arduino mega 2560 v3. I am tying to make a simple rfid sca

How can I get this code to make LEDs linked to my arduino flash at either the value the dial outputs, or no more than a determined value?

Before I get started I want to make it clear I am still a beginner in both C++ and Arduino electronics, so the answer may be painfully obvious to someone with e