Category "c++"

SDL_image failing to initialise

When I try and initialise IMG or use IMG_Load, I get the error: "IMG_Init: Failed loading libpng16-16.dll: The specified module could not be found." From what I

load/save multiple images from/in a directory - opencv c++

i want to load a lot of images (not sequential names though) from a directory. edit them and then save them in a different directory with their original names i

do sequentially-consistent atomic loads (load-load pair) form an inter-thread synchronisation point?

I am trying to understand what does sequentially-consistent ordering mean for loads. Consider this artificial example: #include <atomic> #include <thr

What is the purpose of std::launder?

P0137 introduces the function template std::launder and makes many, many changes to the standard in the sections concerning unions, lifetime, and pointers. Wh

How do I insert customType array data in QDBusArgument

I am trying to set and get DNS using QtDBusInterface. As per the documentation, it has "a(iay)" format. which contains an array of IP types and an array of unsi

How can I call functions from one .cpp file in another .cpp file?

I tried looking this up and got mixed results using header files and such. Basically I have multiple .cpp files with all my functions I made for use with binary

Private Data in VMMap is very large on some machines

I'm trying to debug a memory exhaustion issue for my native Win32 CPP app, so far i have found that on some machine when launched, app the memory usage is very

qualified-id in declaration before '(' token

This is some crazy error and is giving me a lot of trouble. #include <iostream> using namespace std; class Book { private: int bookid; char

Is it possible to popcount __m256i and store result in 8 32-bit words instead of the 4 64-bit using Wojciech Mula algorithm's?

I have recently discovered that AVX2 doesn't have a popcount for __m256i and the only way I found to do something similar is to follow the Wojciech Mula algori

Why I am getting different output in every run in openmp

I have N number of text files. I am trying to read from those files parallelly, so I have forked N threads and each thread gets one text file from those N files

Function to parse automaticly files .txt after 24 hour in c++

I have a project and I'm new to C++ Well I have to parse a file.txt that contains transaction informations in an ATM. And there is files named as the date of th

Are accents and special characters broken in Qt6?

I've got a Qt program that reads from csv files and saves the info into a database. There was no problem until i tried to update from Qt 5.15.2 to Qt 6.3. Now,

Wrapper for std::vector that makes Structure of Arrays look like Array of Structures

I have a vector of a struct with 8 different fields (integers and pointers) that serves as a database for my program. Usually only a few of these fields are act

Visual Studio Code c++11 extension warning

I am in the process of learning c++ and I'm using visual studio code for Mac. I use Code Runner to run my program. My problem is that when I use something from

Visual Studio Emulator is Offline Not Launching C++ Mobile

You might let me explain my little issue. I switched from android studio to visual studio for mobile c++ developing. I installed VS (visual studio) and also an

Using optimistic locks in C++ and memory order

I'm wondering how 'optimistic locks' (as described e.g. here: https://db.in.tum.de/~leis/papers/artsync.pdf) can be used in C++ with regard to non-atomic data a

Fastes way to read a tsv file and store it in a map (C++)

I'm working on a project with 6 huge mapping tsv files. In most cases they look like this: First: ID which is a unique String which starts with a char and goes

Count of combinations with repetitions

I have a very inefficient way of counting the combinations of N/2 items from an array of size N. What I do is sort the array to begin with and then loop through

MCU/embedded: Position independent code, max size for .got section?

I am trying to get my project "position independent", but it won't give... Some background: nxp imx rt 1024 evk board c++ project compiled both C and C++ files

Suppressing the inline variable warning

Background We are trying to "borrow" some code which uses an inline static variable. The code complies, without any warnings, with a C++17 compiler. However w