Category "c++"

std::execution breaks file writing

The program seems to exit without waiting for the file system to apply the inner changes when integrating with std::execution. I recently tried PPL, TBB, OpenMP

Emscripten: Can't using emscripten::val in pthread

I'm working on project to attach video from c++. I have success create video element from c++. video = emscripten::val::global("document").call<emscripten::v

error: request for member is of non-class type string & char

this is my Node Structure; class Node { public: string data; Node *next; Node *child; }; Node * createList(string *arr, int n) { Node *head = NU

C++ Uniform initialization doesn't work with "expected ';' at end of declaration"

I'm the beginner of C++. I set development environment in vscode in Mac. But I trapped in variable initialization. Copy initialization and direct initialization

boost.beast : HTTP/1.1 400 Bad Request

#include <boost/beast/http.hpp> #include <boost/beast/ssl.hpp> #include <boost/beast/version.hpp> #include <boost/asio/executor.hpp> #in

How Can I Convert Image .png to string in C++?

I am new to using C++. I am trying to convert an image to a string (I need to convert an image to a buffer). So I use the "opencv" library. I try it but it does

Split linked list c++

For this function, the return value type should be Forward_list, but I assign the list with node value type, so what's the alternative so that my_list.head_ ret

Converting sensor data (two's complement) to signed integer

I've seen a couple old posts that had a similar context but the answers were code snippets, not explanatory. And I can't even get the code offered in those answ

Group of structured binding errors, pertains to neural networking

so i downloaded a library that hasnt been in use in years, for Neural Evolutionary Augmenting Topologies. Basically, a neural network that evolves. It came with

Delete empty lines in file

I'm trying to delete empty lines from a file. Currently it deletes all except for the one I add at line 35:out_file << data_vector[i] << "\n"; How d

Do invalid statements provide valid results [duplicate]

I made this code and it should be invalid #include<iostream> using namespace std; int main() { int a,b; a=3,014; //invalid b=(

Is it possible to force Compile-Only with CMake?

I've got a very huge project (~180 libs, ~1Mio LOC, CMake but exclusively developed with VS2017 + permissive, ~30 third-parties) that needs to get ported to Lin

How can I create a Qt project without a UI/Designer file?

I'd like my project to be written programmatically instead of using Qt Designer. EDIT: I'm just asking for a template :P

libxl Library VS Code Setup

I've tried to use libxl library but there is no installation document for vs code even if I try to add header files there is an error message "no such file or d

Using web sockets with C++ and set the object protocol

I'm a complete beginner to all things HTTP and Websockets. I am trying to figure out how to setup a websocket for this specific example: https://docs.automata.t

Is there any way to draw line by it's center in OpenGL?

I'm making a class that draws axis for a graph. And the result should look like this: And I want to draw lines which represents scale by only passing the coord

Boost async_pipe not showing all child process output

I ran into a roadblock. The code below has issues, but this is just a demo; I want to get the high level logic correct first. The two startup application output

Polymorphic class

In a C++ program in which there is a base class with a virtual function and two derived classes with redefinition of that virtual function , which class is a po

Visual Studio Code C++ Linux Library's On Windows

So basically I am writing a socket program in C++ on a Windows machine. But I am running a WSL and compile the code within the WSL because I am building it for

MPI - Send (unordered) map

I am trying to find a way to send an unordered map from one node to another using MPI. The exact data structure I am trying to send is a nested unordered map (s