Category "c++"

Redirect stdout from Executable Custom Action to MSI log

I have a Custom Action that runs an executable within an msi installer package. The exe is compiled as a console application and stdouts necessary info. I want

Error: "cannot bind packed field" while inserting data into std::map using insert function

Can somebody tell me the difference between #pragma pack(push,1) and __attribute__((packed))? I am getting a compilation error if I use second type of struct pa

How to make a "xoxo" console pattern in C++

How to make like this? I want to try to make it. For example, I have an input whose contents must be odd input = n > 0; n = odd numbers; such as N = 1, the

gSoap error : xlocale.h No such file or directory

I am trying to create C++ soap webservice client in Windows 7. I am using gSoap and I followed gSoap tutorial. first and second commands worked but c++ -o ma

conan system_requirements auto install

While installing xorg with conan install .. command, system requirements are checked in conan receipe using pkg-config tool. Each missing system package raises

conan system_requirements auto install

While installing xorg with conan install .. command, system requirements are checked in conan receipe using pkg-config tool. Each missing system package raises

How to, given UV on a triangle, find XYZ?

I have a triangle, each point of which is defined by a position (X,Y,Z) and a UV coordinate (U,V): struct Vertex { Vector mPos; Point mUV; inline Ve

What are monadic bind and monadic return for C++23 optional?

C++23 std::optional is finally getting some very useful additions. Since my knowledge of FP is very primitive I am wondering what is the syntax for the followin

When calling the function this error [Error] incompatible types in assignment of 'char' to 'char [40]'

I am returning the *res (which is value resultant string after concatenating strings) in the function. When I call this function and store the result in the ch

How to stop long operation on QThread?

I've made some research but I couldn't find the answer to why my solution is not working. But to the point. I've got QWidget as a separate dialog in my app. I'm

Parts of a structure in C++ [closed]

Here is a code of a structure. On that there is a BSTree function included on the structure. I am stuck because I do not understand how a func

Is it possible to use 'if constexpr' to determine if a template function could be instantiated with a particular type parameter?

Suppose there exists the following code: class Foo { public: void foo() const { std::cout << "foo" << std::endl; } }; class Bar { public:

Why is my OpenGL texture black (in Dear ImGUI)?

In OpenGL 4.6, I (attempt to) create and initialize a solid color texture as follows: glCreateTextures(GL_TEXTURE_2D, 1, &_textureHandle); glTexParameteri(G

Strange unicode error when converting Chinese wide strings to regular strings in C++

Some of my Chinese software users noticed a strange C++ exception being thrown when my C++ code for Windows tried to list all running processes: 在ࣩ

Keep getting error message not all control paths return a value

bool isEnemy(const string& check) { if (check == enemy1 || check == enemy2 || check == enemy3) // if the name being checked is an enemy of this kni

What do the values of the C++ "feature test macros" mean?

To test for a feature, cppreference mentions these feature test macros: link. If the feature is present in the compiler, the macro is defined. But I don't unde

Only clang-cl is supported on Windows when building project with webrtc

I am trying to build a project that contains webrtc. However compilation fails with this error : vendor\webrtc\src\base/compiler_specific.h(11,1): fatal error C

Cache-friendliness std::list vs std::vector

With CPU caches becoming better and better std::vector usually outperforms std::list even when it comes to testing the strengths of a std::list. For this reason

Arduino servo code resetting to positon 0

(excuse my english) Hi. I'm a beginner at coding who started trying things in Arduino and c++ (because of Arduino). Recently I just learned that you could write

How to disable a particular CustomAction for previously installed version during an upgrade installation with MSI database?

I have a package whose previously installed versions contain a series of poorly designed custom actions: they do stuff that can be done out of the box. Thus I'm