close
Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
-3 votes
0 answers
58 views

I am writing a console application with Visual C++ Studio Express Edition. I have several iterations which call a function which uses printf() function. It compiles successfully, but when I run the ...
0 votes
1 answer
107 views

I am using MFC. The property sheet is displaying the 32 x 32 images. And the dialogs static controls are showing the 64 by 64 versions. The property sheet is of type CMFCPropertySheet And the other ...
-1 votes
0 answers
114 views

The folowing code implements vector types based on aligned static arrays of arbitrary element type and count. #define BITOP_RUP01__(x) ( (x) | ( (x) >> 1)) #define ...
10 votes
1 answer
435 views

I stumbled upon this code: struct type1 { int a; }; struct type2 { int a; type1 agg; int b; }; struct deducer { operator type1() { return type1{}; } }; auto main() -> int { ...
Advice
0 votes
0 replies
83 views

I'm new to VTK. I use the VC++ compiler and have always drawn objects using Windows GDI/GDI+ and OpenGL. I'm currently switching to VTK for practical reasons, and I'm very happy with it because it ...
4 votes
2 answers
153 views

Consider the following three files "main.cpp" #include ".hpp" __declspec(noinline) int main(int, char**) { x().DoFoo(); x::dobar(); ::dobaz(); return 0; } "....
0 votes
0 answers
79 views

I build my C++ program in Visual Studio 2022 (cmake-project) using a large static-built library (QT). The library was built in Debugx64 mode. I want to build program including debug information for it,...
Advice
1 vote
6 replies
182 views

I’m an undergraduate CS student working on a final project due in about a month, and I’m trying to design and implement a C++-based AI Neural Network Simulator integrated into a small game environment....
6 votes
0 answers
232 views

Consider this simple code with two files: module.ixx export module m; import std; export namespace m { struct Object { std::string_view data() { return "DATA"; } }; } ...
1 vote
1 answer
176 views

I’m experimenting with C++20 concepts and encountered a compiler discrepancy. This code compiles on Clang 17 and GCC 13, but MSVC (VS2022) rejects it: template <typename T> concept HasFoo = ...
6 votes
0 answers
186 views

I found accidently that MSVC compiler from Visual Studio allows one to declare an alias for a function type with auto deduced return type, see T in the example program as follows: auto l = +[]{ return ...
Best practices
1 vote
2 replies
85 views

Environment: Windows, Visual Studio, low level. A bit of context: One of my project is a static library with C functions that export functionalities. Some of those C functions make use of C functions ...
1 vote
1 answer
145 views

Here is the code: #include <atomic> std::atomic_flag bShouldStop = false; int main() { } Compiles on GCC and Clang but not on Visual Studio, gives errors: <source>(6): error C2440: '...
0 votes
0 answers
173 views

I have a Visual Studio solution with this architecture: core.lib api.dll (imports core.lib, no actual code) tests.exe (imports core.lib) I'm running OpenCppCoverage from the root of the solution ...
0 votes
1 answer
214 views

In the 64-bit Windows 10 OS, I want to compile a 32-bit Windows executable via cl.exe with Visual Studio Code. I have installed C/C++, CMAKE and C/C++ DevTools extensions and installed Visuall C++ ...

15 30 50 per page
1
2 3 4 5
2120