Category "visual-c++"

Icons resources dont work in small and list sizes

Have created project on c++ in Visual Studio. Have added resources.rc + .ico file, that have next positions: 32 bits: 64x64, 48x48, 40x40, 32x32,24x24, 20x20, 1

How to convert virtual key code to character code?

In the onkeydown() handler I am getting 219 as the keycode for '['; however, the actual character value of '[' is 91. Is there any way to map these two?

How do I implement stack and queue from a single array in c++?

I'm only familiar with using stack and queue each for different arrays. However,if there is an array A of size 20 that stores integers, how am I going to divide

Passing events to the parent panel

In a Windows Forms application, I want to create a UserControl that reacts to mouse events. But in some cases, I want the event to be passed to the parent that

Are there any good mappings between GCC and MSVC warnings? E.g. -Wredundant-move on MSVC

This question is somewhat two fold, one being more general than the other. The specific question is; does MSVC have equivalent warnings to -Wredundant-move? Mor

'base/debug/debugging_buildflags.h' file not found when building project with webrtc

I am building a project that includes webrtc with CMake, Visual Studio 2019 and ClangCl. This is the command I run to configure : cmake -G "Visual Studio 16 20

error: LNK 2005 when i include regex, vector, or curlpp in c++ CLR

I'm new to C++ CLR development. I'm trying to develop a GUI app but when i include vector/regex/curlpp i get an error while compiling LNK 2005. Anyone have any

When assigning value to a member function pointer, the assignment tampered with other data

Before the assignment operation, the member variable u works fine, see figure 1 After the assignment operation, the data of the member variable u is tampered, s

How to match start and end of input with std::regex on Visual Studio

From what I understand, C++ regex symbol ^ should match only the beginning of input and $ should match only the end of input. This can be changed to match begin

MSVC 2019 and 2022 compiler hangs and is erratic compiling relatively large std::complex arrays in c++17 and c++20

Using the latest C++ MSVC 2019 and 2022 the following code hangs while compiling #include <complex> // const int N = 10000; // about 3 secs // const int N

Printing a message from a base class function through the operator <<

This is the header file with class Rectangle that inherits from class Shape: class Rectangle: public Shape { private: double width; double height;

Visual Studio, Copy files to project directory problem

I have Visual Studio community 2017. coming from eclipse it was just enough to copy file to project directory and hit refresh then files were appearing in proje

On Windows MSVC, is it possible to merge some .obj into one .obj? If yes, how should I do that?

For example, there is three object files a.obj b.obj c.obj just compiled out with cl, and it is desired to combine them into one combined.obj. A comment of an S

for loop not running in C plus plus program, without showing any error - CLOSED

It is a very simple program and I have just started learning c++ but the for loop is not working in this program. can anyone tell me why the for loop in this c+

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: 在ࣩ

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

Lnk1104 cannot open file debug.obj

I have a C++ project in vs 2022 that giving me a lnk1104 error. I have made sure that "debug information format " is set to Z1, but the debug.obj or the .pdb fi

How to shrink the size of a WTL application?

WTL applications are quite small already. However, using VS 2005 a statically linked application with WTL 9.10 weighs in at 136 kB (139,264 Bytes) for the Win32

Operator Overloading Test Failure

Build is successful, but the test case #2 keep failing. I don't know what to change or fix. The test program says that Test Case #2 operator <=() FAILED and

print the unordered map values when key value is given as input

I have written the code to read the string values and mapped as key and value. Now I am facing issue in printing the values, if we have given key value as input