Skip to main content

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#).

visual-c++
-1 votes
1 answer
24 views

File sharing violation with Nlog

My C# DLL configures NLog to save to a file: private static void SetupLogging() { var Config = new NLog.Config.LoggingConfiguration(); var logfile = new NLog.Targets.FileTarget("logfile&...
Andrew Truckle's user avatar
0 votes
0 answers
41 views

Boost 1.85.0 Not Building with VS2022 17.10.3

I'm trying to build Boost C++ library 1.85.0 using Visual Studio 2022 17.10.3 using the following command through Developer Command Prompt. .\b2 -j8 toolset=msvc-14.3 variant=debug link=static address-...
Rishad C's user avatar
-3 votes
0 answers
76 views

The release build crashes without errors on start EXE if used c-strings [closed]

I wrote a simple console application using Visual C++. It parses text and puts it in objects of my class. Here is a simplified definition of my class: class CMyClass { private: static ...
Alex Krebs's user avatar
0 votes
0 answers
18 views

CSES Introductory problem's algorithm - Increasing Array

I am working around to resolve CSES Introductory problem's algorithm - Increasing Array via c++. I need help, please. You are given an array of n integers. You want to modify the array so that it is ...
NoWar's user avatar
  • 37.1k
0 votes
0 answers
30 views

Callable template type deduction questions [duplicate]

In the following C++ (MSVC C++20) code, the goal is to make sure that my templates can properly figure out the type of the first argument of a member function. #include <tuple> template <...
Arush Agarampur's user avatar
-2 votes
0 answers
49 views

C++ C2665: No overloaded function could convert all the argument types [duplicate]

I'm creating an embedded application in C++ and attempting to implement a property system. It's been a while since I've written in C++; I'm having a hard time figuring out the issue. Here is my code: /...
EeZombie's user avatar
0 votes
1 answer
81 views

An error when reading resources in release mode

My program contains two text files with some data as resources in visual C++. They can be load and read as follows. const char* resQ = NULL, *resA = NULL; GetTextResource(IDR_TEXT2, resQ); ...
Alex Krebs's user avatar
10 votes
2 answers
2k views

Logical AND (&&) does not short-circuit correctly in #if

For code: #if defined(FOO) && FOO(foo) #error "FOO is defined." #else #error "FOO is not defined." #endif MSVC 19.38 prints: <source>(1): warning C4067: ...
Harith's user avatar
  • 7,160
0 votes
1 answer
46 views

How do I read the cycle counting register on Windows ARM64

Just bought a windows laptop sporting the Snapdragon Elite processor and trying to get acquainted with the ARM instruction set via some C-code. First attempt is to read from the cycle counter register ...
user1478005's user avatar
0 votes
0 answers
17 views

Trace memory allocated by cl.exe while running build on windows

I am trying to compiler .c files on windows OS with micros VC. Some times builds are intermittently failing with fatal error C1060: compiler is out of heap space. So during build time i want to ...
kathy's user avatar
  • 37
0 votes
1 answer
31 views

Decoding multibyte non-Unicode characters through codecvt fails

I have experimented with std::codecvt on MSVC and encountered an issue with multibyte character encodings ‒ it cannot convert back from valid multibyte sequences, even when those can be produced when ...
IS4's user avatar
  • 12.6k
0 votes
1 answer
69 views

Library Compile time configuration

I'm working on a static library project in Visual Studio 2022, and I want to support per-project compile time configurations. My goal would be to have a header file in the projects that reference this ...
Torino R6's user avatar
2 votes
1 answer
66 views

Can a module partition implementation unit exist without its corresponding interface unit?

cppreference gives an example of a module partition implementation unit (A-C.cpp) being used without having to define a interface unit alongside it: /////// A-B.cpp export module A:B; ... /////// ...
jwick's user avatar
  • 43
2 votes
0 answers
105 views

How to tell MSVC that a pointer inside a struct does not alias another pointer in a struct

The MSVC compiler has a "__restrict" keyword. It works when working with raw pointers directly but apparently not when the pointers are wrapped in structs. I tried the following code: #...
Rouslan's user avatar
  • 113
-2 votes
0 answers
34 views

It is not possible to change the C++ language standard in mvs [duplicate]

enter image description here I can't change the C++ language standard in mvs 2022. When I type std::cout << __cpluspluc; on the console, I see 199711. I don't compile code using "constexpr&...
Renat's user avatar
  • 7

15 30 50 per page
1
2 3 4 5
2116