Questions tagged [visual-c++-2010]

The version of Visual C++ bundled with Visual Studio 2010, released in April 2010. Also known as VC++10, or VC10, based on C++ compiler version 16.0. Do not use this tag unless you have a specific question about this specific version.

The version of Visual C++ bundled with Visual Studio 2010, released in April 2010. Also known as VC++10, or VC10, based on C++ compiler version 16.0. Do not use this tag unless you have a specific question about this specific version.

See for more information.

365 questions
176
votes
4 answers

Should I add .vcxproj.filter files to source control?

While evaluating Visual Studio 2010 Beta 2, I see that in the converted directory, my vcproj files became vcxproj files. There are also vcxproj.filter files alongside each project which appear to contain a description of the folder structure…
87
votes
4 answers

Error when installing windows SDK 7.1

I've run into an error when installing the Windows SDK that I've seen posted around the Internet, but none of the solutions are working for me. Here is the log I'm getting 9:43:37 AM Monday, October 14, 2013: SFX C:\Program Files\Microsoft…
Red Alert
  • 3,706
  • 2
  • 15
  • 23
82
votes
9 answers

Visual Studio 2010's strange "warning LNK4042"

I've just been beaten (rather hardly) on the head by some non-trivial warning from Visual Studio 2010 (C++). The compilation gave the following output: 1 Debug\is.obj : warning LNK4042: object specified more than once; extras ignored 1…
Matthieu M.
  • 251,718
  • 39
  • 369
  • 642
51
votes
1 answer

When can outer braces be omitted in an initializer list?

I've got error C2078 in VC2010 when compiling the code below. struct A { int foo; double bar; }; std::array a1 = // error C2078: too many initializers { {0, 0.1}, {2, 3.4} }; // OK std::array a2 = {0.1,…
Andrey
  • 8,156
  • 3
  • 23
  • 50
41
votes
5 answers

Visual Studio Express 2010 license

Can I use Visual C++ 2010 Express compiler for commercial use? As far as I know, it was always permitted prior to 2010 version, but now when I start IDE, it writes "For Evaluation Purposes Only". I can't find the full license file anywhere (not in…
Mark
  • 411
  • 1
  • 4
  • 3
31
votes
3 answers

Warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)

I have this problem in my code: bool CBase::isNumber() { return (id & MID_NUMBER); } bool CBase::isVar() { return (id & MID_VARIABLE); } bool CBase::isSymbol() { return (id & MID_SYMBOL); }
user3157184
  • 329
  • 1
  • 3
  • 4
30
votes
2 answers

How does switch compile in Visual C++ and how optimized and fast is it?

As I found out that I can use only numerical values in C++'s switch statements, I thought that there then must be some deeper difference between it and a bunch of if-else's. Therefore I asked myself: (How) does switch differ from if-elseif-elseif…
ekul
  • 301
  • 1
  • 3
  • 3
27
votes
2 answers

C++0x Lambda overhead

Is there any overhead associated with using lambda expressions in C++0x (under VS2010)? I know that using function objects incurs overhead, but I'm referring to expressions that are passed to STL algorithms, for example. Does the compiler optimize…
Gratian Lup
  • 1,447
  • 3
  • 19
  • 27
22
votes
5 answers

while installing vc_redist.x64.exe, getting error "Failed to configure per-machine MSU package."

While I am trying to install vc_redist.x64.exe on Windows 8.1 getting following error: Failed to configure per-machine MSU package.
Soman Dubey
  • 3,531
  • 4
  • 19
  • 30
22
votes
4 answers

Preprocessor directives indentation in Visual C++ 2010

I often find myself in situations where I would like to indent preprocessor directives like the rest of the code (e.g. #if indented like if). It seems legal, it's common sense that it's sometimes a good thing, but Visual won't make it easy. Is there…
20
votes
2 answers

The g++'s -g option equivalent to VS2010 cl compiler?

With g++ with -g option, I can use gdb for debugging purposes. What's the equivalent to this option with Visual Studio 2010 cl.exe compiler? This page has different libraries (debug/release) for linking. If I compile with debugging option with…
prosseek
  • 155,475
  • 189
  • 518
  • 818
16
votes
2 answers

Watching a C++ array in Visual Studio

I have declared an array as follows: int *arr; Is there any way in visual studio to watch all the elements of the array while debugging, rather than having to manually place watch for an element *(arr+1), *(arr+2) and so on.
Nemo
  • 20,986
  • 9
  • 41
  • 56
16
votes
1 answer

initializer_list not working in VC10

i wrote this program in VC++ 2010: class class1 { public: class1 (initializer_list a){}; int foo; float Bar; }; void main() { class1 c = {2,3}; getchar(); } but i get this errors when i compile project: Error 1 error C2552: 'c' : …
user335870
  • 391
  • 1
  • 6
  • 18
14
votes
3 answers

How to disable code folding in Visual C++ 2010

Does anyone know how to disable code folding in Visual C++ 2010? In the 2008 version I used to disable it by unchecking a certain check box, but this seems to be removed. I tried to get these How to permanently disable region-folding in Visual…
yep me
  • 141
  • 1
  • 3
14
votes
2 answers

How to add an external static library to a Visual C++ 2010 Express project

I can't believe I'm having such a hard time figuring out how to do something so simple. I have an external library (including a .lib and .h file) that I want to add to my project. From what I've read I need to go Project>Properties>Framework and…
Sarevok
  • 427
  • 1
  • 7
  • 19
1
2 3
24 25