Category "c++"

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

Is there a more stringent version of std::stoi?

I just discovered (much to my surprise) that the following inputs do not cause std::stoi to throw an exception: 3.14 3.14helloworld Violating the principle of

Can one make a 2D matrix class where often accessed sizes, rows and cols, are const members and not getter functions?

I'm continually irritated that matrix dimensions are accessed with getters. Sure one can have public rows and cols but these should be const so that users of th

why is my code not giving me a correct value?

I am doing a memory game (you choose 2 cards, if they are the same, you gain a point), and after finishing my 1v1 version, I wanted to make a bot that I can pla

sws_scale, YUV to RGB conversion

I need convert YUV to RGB. I also need the RGB values to be in the limited range (16-235). I try to use sws_scale function for this task. My code you can see be

How to get char from first bits per byte in uint?

I have uint64_t variable with some value (for example 0x700a06fffff48517). I want to get char with the first bit of each byte in the uint (so from 0x700a06fffff