Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [visual-c++]

Microsoft Visual C++ is a C, C++ and C++/CLI compiler for Windows. The most recent version of the compiler is Visual C++ 2022. The compiler supports the following languages: C (supports C90 and most of C99, C11, C17 parts of the ISO C++ standard as of Visual Studio 2022); C++ (support for most C++11, C++14, C++17, and C++20 features and few C++23 features as of Visual Studio 2022) C++/CLI (Provide interoperability with .NET languages like C#).

0 votes
0 answers
19 views

Problem to run only C++ code in VS code.what can i do?

In my visual studio code , I can't run C/C++ code.But I install MinGw as well as add bin file to Path. Even I run gcc --version and gdp--version to check all is well. Everything is fine. But the ...
ëlêtro's user avatar
-4 votes
0 answers
69 views

Why float variable Don`t work with % module Arithmetic operation in C++ [duplicate]

//it does`nt work the float with % operation #include <iostream> using namespace std; int main () { float x , y; cin >> x ; cin >> y ; cout << x % y; } i ...
Mahmoud Nasr's user avatar
0 votes
0 answers
24 views

Is there any support for mfc140.dll for swedish language?

We have MFC application and where there is problem with internationalization\locale. There is third party dll which creates a Edit control, upon right click, it creates a menu with ID value as ...
Edward Elrich's user avatar
-3 votes
0 answers
74 views

"vector erase iterator outside range" error appears when it clearly shouldn't [closed]

I've implemented a class that wraps std::vector and offers some extra functionality for my needs. It looks like this (Only relevant members are included): #include <vector> #include <...
Lazolv's user avatar
  • 1
2 votes
0 answers
58 views

How to deal with a third party DLL exporting STL symbols?

I am working on a project that is dependent on a third-party DLL. For reasons unknown, this DLL exports (most but not all) of the symbols for std::vector<unsigned char>: $ dumpbin.exe -exports ...
Parker Coates's user avatar
0 votes
1 answer
20 views

Bool serialization with tinyxml2

I have set the following line, just before reading / writing a XML: tinyxml2::XMLUtil::SetBoolSerialization("true", "false"); // Create a xml with bool attributes etc and save. ...
Andrew Truckle's user avatar
0 votes
0 answers
44 views

Why cann't I use non-static data member of type T in parametrized allocator in my MSVC app

I created the following allocator: #include <iostream> #include <map> #include <array> #include <vector> template<class T> struct ContiguousAllocator { public: using ...
qloq's user avatar
  • 1,179
2 votes
1 answer
114 views

Is it possible to define a C++ function where one parameter is passed via the EAX register?

An old game doesn't work on my PC and I want to fix it. A function of the game might cause the problem. So I decided to hook this function with Detours. The following code is generated by IDA. ...
panel's user avatar
  • 41
-1 votes
1 answer
50 views

Cannot cast from System::Object to System::Windows::Forms::MenuItem in C++/CLI

I'm working on my C++/CLI project as I'm adding the sub menu items with click event. I'm having a problem with getting the text of the menu item, because when I try this: Debug::WriteLine("...
Robert Jones's user avatar
0 votes
0 answers
32 views

Need to convert a Visual studio C++ project to a Cmake [duplicate]

I have a c++ code repo it has almost 68 projects within it. It was initially created using MSVC. I need to build that same project with gcc using cmake. Is there a way to convert that to a CMAKE ...
Nesan Mano's user avatar
  • 2,126
1 vote
0 answers
57 views

Examining uninitialized heap memory, strange transition at size 1044472 [duplicate]

In the following C++ program I am examining how many bytes are zeroed in the uninitialized heap memory. #include <cstdio> #include <string> static void CountZerosNonZeros(size_t nBytes) { ...
Dr. Gut's user avatar
  • 2,733
-2 votes
2 answers
114 views

"No operator '<<' matches these operands" error for JSON::Value, how to write it to cout? [duplicate]

My C++ program below is supposed to read a json file called english.json and display the "title" information. #include <iostream> #include <fstream> #include <json/value.h> ...
Anorak The Omniscient's user avatar
8 votes
1 answer
132 views

Weird behaviour with 'if constexpr' and templates in MSVC

The code below behaves incorrectly. When f<0> or f<5> is called, it prints as if k = true, but the if statement behaves as if k = false. When f<1> is called, it does the opposite. ...
daniel creatd's user avatar
0 votes
1 answer
68 views

C++: ODR and extern "C" on MSVC linker

I'm testing out how the Windows link.exe program reacts when presented with ODR violations. My intention is that the linker will fail when it notices that my program has two definitions of the same ...
Martin's user avatar
  • 1,003
0 votes
0 answers
14 views

How to make MSVC++ modules from NuGet available to import?

I want to publish my C++ modules to NuGet. However, tests have found that users are unable to import ixx modules in NuGet as they would with header files. import ModuleFromNuGet; //Failed to build; ...
埃博拉酱's user avatar

15 30 50 per page
1
2 3 4 5
2116