I'm constructing an object that takes a std::vector<std::unique_ptr<A> > as an argument. The constructor is defined like this class B { std::ve
This is my first question so I apologize in advance if I leave anything out or am ambiguous on an item. Anyway, this is code I got form GeeksForGeeks.org (arr
I need to remove the elements that appear in Vector A and Vector B, but keep the elements that are only in Vector A. The vectors can be of any size, but are not
#include <iostream> #include <vector> using std::vector; using MATRIX = vector<vector<int>>; class Matrix { public: MATRIX matri
I have a singly linked list of integers. The node is defined as class Node { public: int value; Node *next = NULL; };
I have some problems with windows focus in SDL2. I got two windows and listen to focus gain and lost events. When I click on Window 2, the following events trig
I have a Windows8 machine with mingw installed in c:\mingw Eclipse does successfully compile programs, but it considers lines to contain errors that are fine wh
Why this cause undefined behavior? #include <iostream> #include <thread> #include <vector> std::vector<std::thread> threads(3); void
As an exercise in learning C++, I want to build my own forward list using raw pointers and using unique_ptrs. Using raw pointers, I have: struct node_raw {
I have installed Valgrind on a Linux system and make this call: valgrind --tool=memcheck --leak-check=full --log-file=valgrindLog/%p --trace-children=yes --xml=
This script makes me import a single file with the 'con.import()' function and it makes output a single file with 'con.print_costum()' function, now i want to i
Question in short: Do you maybe know, or have any idea how I could implement the below mentioned, existing libraries in Python, whether that be through bindings
I am trying to restrict the user to enter only '1' or '2'. int ch; do { cout<<"Enter: \n"; cin>>ch; switch(ch) {
What's the best way of counting all the occurrences of a substring inside a string? Example: counting the occurrences of Foo inside FooBarFooBarFoo
I have the following pattern: [ \n\t]*([a-zA-Z][a-zA-Z0-9_]*)[ \n\t]+((char)[ \n\t]*\[[ \n\t]*([0-9]+)[ \t\n]*\]|(char)|(int)|(double)|(bool)|(blob)[ \n\t]*\[
I am trying to print a queue below. I have tried the idea of creating a temp queue and writing into it then writing it back. But it's not working. Or what am I
I am trying to traverse Eigen::MatrixXd matrix. However, there does not seem to be a function that returns the columns size nor the row size. Does anybody have
Base on this video https://www.youtube.com/watch?v=l4372qtZ4dc I am trying to use OpenCV in vscode but I canot include the, .lib files what should I do main.
I want to inspect the assembly output of applying boost::variant in my code in order to see which intermediate calls are optimized away. When I compile the fol
I found this thread on GitHub, but seems that the code is not C++: WebView2 _webView2 = new WebView2(); CoreWebView2EnvironmentOptions options = new CoreWebVie