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

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 and C17 parts of the ISO C++ standard as of Visual Studio 2022
  • C++: Also includes support for most C++11, C++14, C++17, and C++20 features, and some of features voted into C++23 as of Visual Studio 2022
  • C++/CLI, providing .NET integration in C++
  • C++/CX for interfacing with WinRT

Visual C++ also supports debugging a native code, mixed (native+managed) code, as well as raw assembly code. Rich debugging features include debugging from start, attaching to a local or a remote process. It also allows multiple processes to be debugged at once. Breakpoints, conditional breakpoints, data breakpoints are of great help.

Resources

31430 questions
563
votes
5 answers

What is "stdafx.h" used for in Visual Studio?

A file named stdafx.h is automatically generated when I start a project in Visual Studio 2010. I need to make a cross-platform C++ library, so I don't/can't use this header file. What is stdafx.h used for? Is it OK that I just remove this header…
prosseek
  • 182,215
  • 215
  • 566
  • 871
467
votes
31 answers

Why is this program erroneously rejected by three C++ compilers?

I am having some difficulty compiling a C++ program that I've written. This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I've read over the entirety of ISO/IEC 14882:2003 twice to…
James McNellis
  • 348,265
  • 75
  • 913
  • 977
343
votes
36 answers

Error "Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)"

I've installed Python 3.5 and while running pip install mysql-python it gives me the following error error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat) I have added the following lines to my Path C:\Program Files\Python…
Umanda
  • 4,737
  • 3
  • 23
  • 28
243
votes
3 answers

What are the debug memory fill patterns in Visual Studio C++ and Windows?

In Visual Studio, we've all had "baadf00d", have seen seen "CC" and "CD" when inspecting variables in the debugger in C++ during run-time. From what I understand, "CC" is in DEBUG mode only to indicate when a memory has been new() or alloc() and…
HidekiAI
  • 3,013
  • 3
  • 20
  • 22
237
votes
4 answers

What does #defining WIN32_LEAN_AND_MEAN exclude exactly?

I found the explanation defining WIN32_LEAN_AND_MEAN "reduces the size of the Win32 header files by excluding some of the less frequently used APIs". Somewhere else I read that it speeds up the build process. So what does WIN32_LEAN_AND_MEAN…
fishfood
  • 4,092
  • 4
  • 28
  • 35
224
votes
5 answers

Visual Studio 2010 - C++ project - remove *.sdf file

I would like to know if I can safely delete the sdf file that stores information for Visual Studios Intellisense - is it going to be rebuilt the next time that I open the solution? Do I lose anything by doing so? Is it possible to break the solution…
kubal5003
  • 7,186
  • 8
  • 52
  • 90
222
votes
31 answers

Unresolved external symbol in object files

During coding in Visual Studio I got an unresolved external symbol error and I've got no idea what to do. I don't know what's wrong. Could you please decipher me? Where should I be looking for what kind of errors? 1>Form.obj : error LNK2019:…
Novellizator
  • 13,633
  • 9
  • 43
  • 65
211
votes
28 answers

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

I'm using CUDA (VC++, Visual studio 2008sp1) to debug a FEM program. The program can only run on a Win32 platform, for the insufficiency of cuda. I think the library files linked are all compiled on the x86 platform, but when I compile it, I get the…
user430382
  • 2,111
  • 2
  • 13
  • 3
208
votes
23 answers

How to keep the console window open in Visual C++?

I'm starting out in Visual C++ and I'd like to know how to keep the console window. For instance this would be a typical "hello world" application: int _tmain(int argc, _TCHAR* argv[]) { cout << "Hello World"; return 0; } What's the line…
Raúl Roa
  • 12,061
  • 13
  • 49
  • 64
206
votes
5 answers

Automatically add all files in a folder to a target using CMake?

I am considering switching a cross platform project from separate build management systems in Visual C++, XCode and makefiles to CMake. One essential feature I need is to add automatically all files in a directory to a target. While this is easy to…
martjno
  • 4,589
  • 5
  • 34
  • 31
192
votes
8 answers

Link to all Visual Studio $ variables

I was having a look at $(Configuration),$(ProjectDir) etc. in Visual Studio 2008 for Prebuild events. Is there a link to all of these variables with a definition for each one of them?
chugh97
  • 9,602
  • 25
  • 89
  • 136
189
votes
5 answers

What does "#pragma comment" mean?

What does #pragma comment mean in the following? #pragma comment(lib, "kernel32") #pragma comment(lib, "user32")
user198729
  • 61,774
  • 108
  • 250
  • 348
183
votes
8 answers

Which Visual C++ file types should be committed to version control?

Which Visual Studio \ Visual C++ file types should be committed to version control? In my project I have the following file…
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
178
votes
37 answers

How to determine if a string is a number with C++?

I've had quite a bit of trouble trying to write a function that checks if a string is a number. For a game I am writing I just need to check if a line from the file I am reading is a number or not (I will know if it is a parameter this way). I…
Brendan Weinstein
  • 6,938
  • 7
  • 25
  • 29
164
votes
7 answers

How do I set the path to a DLL file in Visual Studio?

I developed an application that depends on a DLL file. When I debug my application, the applicationwould complain that: "This application has failed to start because xxx.dll was not found." So I have to copy the DLL file into the same directory as…
sivabudh
  • 31,807
  • 63
  • 162
  • 228
1
2 3
99 100