Category "c++"

Why is memory adress getting printed instead the values of array in c+.+

When I'm trying to print the values of an array, its memory location is getting printed instead of values. What am I doing wrong? int main() { int list[3];

How to make a C++ class iterable from Python using SWIG?

I have a C++ class Collection that manages a std::vector<Element> (a private member of the class). From C++ I can iterate through the vector using the b

Beginner C++ Beverage Survey Tally

I am working on an assignment that is supposed to perform a survey tally on people's favorite beverages. Ideally it will continue asking the user to submit a fa

Skeletal mesh not rendering in UE5

I am trying to follow along with a tutorial that was designed for UE4. However, I was wanting to play around with UE5 (since it just came out). I was able to fi

Controlling Program Flow Between VB and C++

I have a program that runs from VB/Excel and executes a C++ program in the middle of it. I have two (I think related) questions: I capture the return value fr

Macro to repeat a single character multiple number of times

I am learning about macros and I want to know that whether it is possible to create a macro that repeats a given character literal a given number of times. For

What does "Symbol not found / Expected in: flat namespace" actually mean?

When I import a module I built, I get this boost-python related error: Traceback (most recent call last): File "<string>", line 1, in <module> Im

How to Upscale window or renderer in sdl2 for pixelated look?

I want this pixelated look in sdl2 for all the object in my screen

how to use shift operator in cout statement as it is overloaded

I am quite new to C++, I know that shift operator in C++ is overloaded. But as how we can do shift operation within printf statement in C can we do similar shif

QT QTest::keyclick or mouseMove seems don't work with QMenu in my case

I have a simple flow Click on QPushButton QMenu with a couple of actions appears Navigate through the QMenu using key clicks or mouse move. (Triggering actions

QWebChannel after I registered some objects I need to register a new object to the Js but it faills to call this new objects cpp functions

At some I need to register some objects with qwebchannel and futher in the application I need to register a new object to the qwebchannel. The thing is that it

Choco-solver IntVar declaration : How to declare an IntVar with two(or more) boundedDomain?

IntVar v = model.intVar("v", 1, 12, true); // or v= model.intVar("v", 20, 30, true); I want the value of IntVar v not only in [1,12] but also in [20,30] and i

transfer a 2d array from python to c++ and back

I am using python to call methods in a shared C++ library. I am having an issue converting a numpy 2D array to a C++ 2D array. I need to enable the following fu

Creating packet sniffer in c++

I have before created a simple packet sniffer using python, with the following code: import socket import os import time host = "192.168.0.164" if os.name ==

Why is the vector subscript out of range?

I'm trying to code this really simple addition program for practice. It takes in a list of inputs and stores it in a vector. Then it grabs each consecutive elem

Why is value-initialization specified as not calling trivial default constructors?

To value-initialize an object of type T means: ... — if T is a (possibly cv-qualified) class type without a user-provided or deleted default constructor,

Retrieve multiple ArrayFire subarrays from min/max data points

I have an array with sections of touching values in it. For example: 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 0 0 0 0 0 0 0 0

Why are unqualified names from nondependent base classes favored over template parameters

The C++ standard says that unqualified names from nondependent base classes are preferred over template parameters. What is the reasoning behind this? The follo

Glade Toggle Button save state

so what i am trying to accomplish is that i have a glade project in linux with a toggle button, when a user presses the toggle button and and eventually closes

gtest - testing template class

I want to test a template class with gtest. I read about TYPED_TESTs in Google Test manual and looked at official example they reference, but still can't wrap m