Category "c++"

how to store additional data in a text file apart from it's content - C++

I am doing this small university project, where I have to create a console-based text editor with some features, and making files password protected is one of t

I want to use a UAV in a pixel shader to read the data in the buffer with the CPU

I would like to have information on the number of vertices that have been increased by doing Tessellation. To do this, we send the vertex information from the D

Boost Beast async_write() With Queue

I have the following code: std::queue< nlohmann::json > outgoingMessages; void session::do_write( void ) { if ( outgoingMessages.size() > 0 ) {

opencv tutorial problem with samples::findFile()

when I'm trying to run this tutorial I'm getting this problem on samples::findFile() I tried to #include <opencv2/core/utility.hpp> but same problem, any

error: (-215:Assertion failed) (int)_numAxes == inputs[0].size() in function 'getMemoryShapes'

im trying to use opencv to do face recognition using facenet512. i converted the model to onnx format using tf2onnx. i know that the input of the model should b

Compiling a JNI file with c++ postgresql in command prompt getting fatal error

Command executed: g++ -I"C:\Program Files\Java\jdk-16.0.2\include" -I"C:\Program Files\Java\jdk-16.0.2\include\win32" -I"C:\Program Files\libpqxx\include\pqxx"

STL parallel execution vs. OpenMP performance

I'm starting a new project and would like to parallelize some computations. I've used OpenMP in the past, but am aware that now many STL algorithms can be paral

`make_unique_for_overwrite` still initializes `std::pair` elements

I was hoping that auto myPairs = make_unique_for_overwrite<pair<uint64_t, void*>[]>(arraySize); would give me uninitialized memory for my pairs. I

Build specific modules in Qt6 (i.e. QtMqtt)

For a project which uses MQTT, I always had to compile the QtMqtt module from source, because it wasn't included in the prebuilt windows release and couldn't be

How to copy char array of a structure into another char array of a structure?

#include <iostream> using namespace std; struct stud { char name[10]; int id; }; int input(stud a[], int size) { for(int i=1; i<=size; i+

Distirbute Candy - Finding minimum reproducible example of the problem

The question is to distribute candies to N children.Each child has a rating. Distribution should be such that each child have at least one candy and children wi

i have an assignment that works in compiler but does not work properly in assignment website

I have a homework that requires me to do operations on a string, I used an iterator in the second function to find the last index of a letter in the string and

gRPC / C++- How to leave server streaming rpc on

Hello I have this code: Status ListFeatures(ServerContext* context, const Rectangle* rectangle, ServerWriter<Feature>* writer) overrid

Coursera DSA Algorithmic toolbox week 4 2nd question- Partitioning Souvenirs

Problem Statement- You and two of your friends have just returned back home after visiting various countries. Now you would like to evenly split all the souveni

Unnamed union member has non-trivial operator

I am working on a project started back to 1980s, my mission is to substitute the primitive double with the Dummy class I create. The following is the simplified

Calling `std::vector<A>::data()` on `A` with const or reference fields, before C++20

This is a followup on the answers for placement new on a class with reference field. Calling std::vector<A>::data() on type A that has reference or const

Naive reverse string iteration infinite loop and/or assertion failure C++ / Visual Studio 2022

I am trying to reverse iterate through a string, but am getting assertion failure for the [] operator in the latest VS. int foo() { std::string s = "s";

Let Join C++ MYSQL library

I'm trying to access "category" table with LEFT JOIN. I need to retrieve the field "name" in this table. This is my code: void Product::read(MYSQL *connection)

Why is an overloaded function with two arguments of type double called when passing a long long?

I wrote those two overloads: int func(int, int) { return 1; } int func(double, double) { return 2; } When I call them with the obvious two calling

Spectre-mitigated libraries are required for this project after disabled giving error that it needs to be enabled

Hope you are all doing well. I've decided to start learning kernel driver devlopment via microsofts documentation. I've downloaded the WDK and Windows SDK(10.0.