In an ROS2 action server callback function, I need to access data which is published on some ROS topic. How can I achieve this, in a straightforward and clean w
Lets say you have the class a and you want to add a child class b how would you go by doing this? Maybe something like this: class a{ public: class b{
In the following code, both the template and the function compare two strings and return which one is bigger. However, despite the same code (definition body),
I've already seen the boost::process tutorial... but there the example is a single write then a single read from the child process. I want to know if it is poss
I have been trying to build, to no avail, the Cookbook under Xcode 13.2.1. I get "Analyze Failed" with the following errors: Stk: Command CompileSwiftSources fa
I'm a student and currently experimenting with the QoS-settings in ROS 2. I'm trying to implement the (RMW_EVENT_REQUESTED_DEADLINE_MISSED) event. First I decla
Rewriting a single tiny block of code of an application has yielded a considerable performance improvement. The code is 100% sequential, thus
i try to run a member function with QtConcurrent. I am just learning c++ and qt and i used the way i found in their official documentation: https://wiki.qt.io/Q
I have already created binary tree, and i have to paint every node in red or black to make red-black tree. struct node { string name; int year; int
I'm fairly new to C++. Have a struct Bbox with a constructor with two arguments x and y which I have just added. Before when the constructor had no arguments I
I have tried to run the program with more than one inheritance i got many errors For this program ,but when i use it for Source File, it will
I am developing an application with tabviews. I want that tabView to change the widget depending on the ComboBox choice. ex: if the first index chosen I want ta
I am compiling a class, the complete program to which is given below: #include<iostream> using namespace std; class Test{ public: Test()
I'm trying to parallelize this C++ code (computing a continuous Fourier transform of points, modeled as Dirac impulses), and this code compiles and works correc
The following code prints the argument passed to the function foo in every 5 second interval. function foo(arg) { console.log(arg); } setInterval(() => fo
Recently I ran into a crash while the following statement is getting executed static const float kDefaultTolerance = DoubleToFloat(0.25); where DoubleToFloat
How does the below syntax work? class Solution { public: int lengthOfLongestSubstring(string s) { const int n = s.length();
I am currently practicing algorithms and DS. I have stumbled upon a question that I can't figure out how to solve. So the question's link is there: In summary,
C++ this code work in exe, but not working in dll when python is used. Python throw this error when program run to dec(&buffer2, &length, &buffer);
I have a folder with multiple cpp files that I want to compile to a DLL with g++ (MinGW). My Tasks.json looks like this: { // See https://go.microsoft.com/fwlin