Let's say I have the following string that I want to tokenize as per the delimiter '>': std::string veg = "orange>kiwi>apple>potato"; I want every
Consider this code, running on a Linux system (Compiler Explorer link): #include <filesystem> #include <cstdio> int main() { try {
I was attempting to compile and run the example on this page that explores function pointers as a function input. The example I was running was the 66 line one
In my project I rely on some third party shared library named foo. foo itself is relying on some other third party dll (let's call it bar.dll), which is however
I am trying to use Eigen::pardisoLU but I have no output. This is my cmakelists.txt: cmake_minimum_required(VERSION 3.9) project(my_test_project) aux_source_dir
I am looking to replicate the look of the TableView presented in this picture using Qt. The one in the picture looks to be created with Windows Forms. The mai
For a proof on concept I want to use a CMAKE library in a large bazel (4.2.1) project. In my first attempt I build the library outside bazel by hand and am load
I'm using opencv 3.1.0, tried to read an image by imread, just like Mat image = cv::imread("1.jpg"); but it stunked without any error message (performs like in
I have a base class and 3 separate derived classes. All of the .hpp files are structured the same. The .hpp which doesn't work: #ifndef CAESARCIPHER_HPP #define
So, was trying to compile Bitcoin Core from source. I configured and downloaded all the dependencies I needed. But when compiling, Boost library for C++ gives w
I'm developing a software using C++ for Windows/Linux. I want to create a file (txt, json, license, you name it) at runtime, and save it somewhere. Is it possib
Explicit template instantiation is very useful when creating libraries. Suppose I have a template with an int paramater: template <int i> struct S { ... }
I have this code: #pragma acc kernels #pragma acc loop seq for(i=0; i<bands; i++) { mean=0; #pragma acc loop seq for(j=0; j<N; j++) m
Indicate in cppreference that the expression representing the subscript must be a prvalue of unscoped enumeration or integral type. So why can a for loop that
So,I'm trying to build a small app that watches my MQTT server for messages and presents a widget with the MQTT JSON content for every message it sees. The logi
So try to write a program that allows the user to range the number of rows in the program. I was unable to figure out how I was able to do so using a char array
May I ask if we are allowed to explicitly call base class constructor in derived class? (if not, why?) I'm asking this question because I wrote the following to
I'm trying to create a python library, written in c++, using boost-python, and mingw to compile. c++ Code: char const* greet() { return "hello, world"; } #i
I have a c++ class with several constructors: MyClass(const std::string& configfilename); MyClass(const MyClass& other); I have python bindings for thi
I have a reference to my object of type MyType, but I need to call a function, say myFunction that takes a std::unique_ptr<MyType>. What is the correct wa