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
Is there a way to get mtu C++ portable way? Like from both Linux and Windows ? I know in Linux this is the code : sys_get_mtu(const char *ifname) { struct
For ex, unordered_set<int> s ; s.insert(100); How do I get value 100 from s? From http://www.cplusplus.com/reference/unordered_set/unordered_set/begin
I am new to c++. I want to take input a unsigned 128 bit integer using scanf and print it using printf. As I am new to c++ , I only know these two methods for i
I have some code that reads the name of the file from arguments and outputs that file into the command line: #include <stdlib.h> #includ