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
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
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
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
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
I´m trying to load all the files in a folder that have names from the form "file_i.csv". For this I write the program: void load_reel_set() { bool fil
I am working with the windows.h functions and everything works fine so far. But when I try to use functions which require me to link external libraries somethin
I have a C++ application on Windows, that logs to stdout (via the Win32 api using WriteConsole). Each logline consists of some text and a trailing newline chara
The result is below,I run the project stylegan2, but it fails. So I need help. The link is https://github.com/NVlabs/stylegan2 File "/home/ubuntu/worksp
this code is to take an equation from the user in the form of a string and then the program configures the confessions and store them in a dynamic array; now I
I recently made a program with C++ and ASM. Can anyone help me make this code a more efficient one , in the ASM part or both. I would really a
Im using c++ 11, I need to save/load array to and from file. Its the battleship game its need to be done for both user and computer array but i have no idea how
I've just read What is the purpose of std::launder? and frankly, I am left scratching my head. Let's start with the second example in @NicolBolas' accepted answ
According to cppreference, most uses of the volatile keyword are to be deprecated in C++20. What is the disadvantage of volatile? And what is the alternative so
I am using qmake to compile my QT project. In my .pro file I have a line: QT += 3dcore 3drender 3dinput 3dextras When executing qmake myprofile.pro I get the
I want to build my C++ applications from the Windows PowerShell command line using CMake and MinGW. When I do this in the "normal way," with these commands: m
I am wondering how exactly printf("%d",x) is interpreted. All I know that the compiler reserve a memory to put '%','%d','\0' and returns its address to printf,
I am getting the following error while compiling a simple imgui+glfw+opengl3 program on GCC 11.2.0 on Pop!_OS (Ubuntu): [build] In file included from ../externa
I have come across many occasions where I want to have an item which is selected inside a vector, for this I have written the template class: // a vector wrappe
so I want to debug my .cpp program file but when I click on the Run and Debug button and proceed to select my debugging environment (C++ (GDB/LLDB)), the popup