Category "c++"

LNK2001 Error even though .cpp is being compiled

I'm working on a project where I'm using Bullet3 to add a Physics Simulation Component-System to EntityX. I'm getting link errors when compiling code, and I ca

Disable whole test case in gtest

How can one disable a complete test case in gtest? (all the tests in a test case, not just individual tests) The formatting proposed in the gtest doc is to org

Why is stack memory size so limited?

When you allocate memory on the heap, the only limit is free RAM (or virtual memory). It makes Gb of memory. So why is stack size so limited (around 1 Mb)? What

Logical indexing - numpy.where in C++

I have created a simple numpy array with shape (4, 2) called A. import numpy as np A = np.array([[1, 2], [2, 2], [3, 2],

PyArray_Check / PyArray_CheckExact gives segmentation fault

In c++, I define the following module: #include <boost/python.hpp> #include <numpy/arrayobject.h> bool foo(PyObject *obj) { if (!PyArray_Check

Segmentation fault in calling Python script from C++

Summary: I am getting a segfault when calling an embedded Python script, which somehow only happens when the script is called the second time around. Hello the

GMP Library, compile error in C++, MinGW, Code::Blocks

I have built GMP for MinGW. The IDE I'm using is Code::Blocks. I don't have any problems with C functions of GMP. But I'm having problem with C++. The program I

How is the UI of terminal texteditors implemented?

Terminal texteditors like emacs,vim,joe or even nano have the ability to display arbitrary UI elements inside a command line without completely rewriting the wh

C++ Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call

I am trying to program motorbee using c++ when I run the code I get the following error: Run-Time Check Failure #0 - The value of ESP was not properly s

C++ - Qt Creator - /How to have DOT and COMMA as decimal separator on a QDoubleSpinBox?

I am building a C++ GUI application on QT Creator. I changed the location to Portuguese/Brazil, now only comma is the decimal separator. I need the QDoubleSpin

How to get configuration.h from configuration.h.in in OpenSSL?

I am working with the OpenSSL library for C++. I used this library in another project and it worked great. I carried it over to another project today and I'm ha

Cannot load JPG image Pdfium

I try to do some stuff with PDF for a project. I'm trying to do some interop with Pdfium: https://pdfium.googlesource.com/pdfium/. I want to convert a JPG image

Acces element of QVector pointer containing pointers

I have the following QVector pointer: QVector<someStruct*>* qvp; How can I acces someStruct members? Let's assume that qvp has some elements to access al

Unexpected Program exit with Code 0xC0000417 (Invalid C-Runtime Parameter)

After upgrading a big project to Visual Studio 2013, the program cased a crash (Program stopped working) on a normal computer. Now when I debug this program in

How to check c++ pointer pointing to invalid memory address?

Is there anyone show me how to check my pointer is pointing to an invalid memory address. #include<iostream> class Node{ public: int data; Node * ne

Generating combinations in c++

I have been searching a source code for generating combination using c++. I found some advanced codes for this but that is good for only specific number predefi

How to obtain mesh from Skia path geometry?

I'm trying to figure out how to make Skia produce mesh from path geometry. I've checked SkPath::dump, SkPath::writeToMemory, SkPath::serialize, however all of t

How to make a .lib file when have a .dll file and a header file

I am trying to create an application in visual studio that will be able to access a .dll file that already exists. I need the application to call up routines. I

XOR Operation Intuition

I recently came across this question on Leetcode and figured out a solution that I need some clarification with: Given an array of integers, every element a

May I declare "using namespace" inside a C++ class?

Assume having a C++ class. And there's a namespace which should be visible only inside my class. What to do for that? class SomeClass { using namespace Som