visual-studio-2012

Forward declaration of objects with STL containers

为君一笑 提交于 2019-12-19 17:48:07
问题 Consider the following code snippet, where the first line serves only as forward declaration class A; followed by defining new class class B { vector<A> Av; //line 1 map<int, A> Am; //line 2 pair<int, A> Ap; //line 3 }; line 1 and line 2 seems to be fine with the forward declaration (which may tell me that those container use pointer type of implementation) where as line 3 does not seem to compile on VS2012. My question is that behavior dictated by the standard or specific to the compiler I

nvcc.exe linking error Microsoft Visual Studio configuration file 'vcvars64.bat' could not found

五迷三道 提交于 2019-12-19 17:04:22
问题 I want to use nvcc -ptx from windows command line, but I always get this error message: nvcc : fatal error : Microsoft Visual Studio configuration file 'vcvars64.bat' could not be found for installation at 'C:\Program Files (x86)\Microsoft Visual S tudio 11.0\VC\bin/../..' I'm using vs 2012 express edition. What can be the solution? 回答1: I have managed to solve the issue and make work with MS Visual Studio Express 2012, here what I did: Installed MS Visual Studio 2012 Express Installed cuda_5

Code coverage for async methods

旧时模样 提交于 2019-12-19 16:54:43
问题 When I analyse code coverage in Visual Studio 2012, any of the await lines in async methods are showing as not covered even though they are obviously executing since my tests are passing. The code coverage report says that the uncovered method is MoveNext , which is not present in my code (perhaps it's compiler-generated). Is there a way to fix code coverage reporting for async methods? Note : I just ran coverage using NCover, and the coverage numbers make a lot more sense using that tool. As

How to add reference to assembly in vs2012

假装没事ソ 提交于 2019-12-19 16:34:31
问题 I need help on how to correctly add assembly in C# code. I start a blank project and trying to run the simple code below. but has referencing errors. I know by default system.dll is included under the references folder. so why is it still complain that "'System.Configuration is not been referenced"? Am I missing some manual steps? If so how do I do it? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net

How to add reference to assembly in vs2012

我的梦境 提交于 2019-12-19 16:33:40
问题 I need help on how to correctly add assembly in C# code. I start a blank project and trying to run the simple code below. but has referencing errors. I know by default system.dll is included under the references folder. so why is it still complain that "'System.Configuration is not been referenced"? Am I missing some manual steps? If so how do I do it? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net

How to make a Copy of a Project/Solution in Microsoft Visual Studio 2012?

自作多情 提交于 2019-12-19 16:13:21
问题 As title states: How to make a Copy of a Project/Solution in Microsoft Visual Studio 2012? It is such a simple option, and it seems to be unavailable. 回答1: Here is the good news: If you have Blend for Visual Studio 2012 installed, which came with my Microsoft Visual Studio 2012 Professional installation, then you can do the following: Save the project in Microsoft Visual Studio 2012. Open Blend for Visual Studio 2012. Open the project you are working on. Go to File > Save Copy of Project Open

How to make a Copy of a Project/Solution in Microsoft Visual Studio 2012?

元气小坏坏 提交于 2019-12-19 16:13:20
问题 As title states: How to make a Copy of a Project/Solution in Microsoft Visual Studio 2012? It is such a simple option, and it seems to be unavailable. 回答1: Here is the good news: If you have Blend for Visual Studio 2012 installed, which came with my Microsoft Visual Studio 2012 Professional installation, then you can do the following: Save the project in Microsoft Visual Studio 2012. Open Blend for Visual Studio 2012. Open the project you are working on. Go to File > Save Copy of Project Open

Intellitrace not available for VS 2012 Professional edition?

六眼飞鱼酱① 提交于 2019-12-19 15:14:35
问题 If so, how do i turn it on? I don't see it under Tools-> Options If not, anywhere I can download it? 回答1: Here is the product matrix from the Microsoft Visual Studio 2012 site. It shows that it is only available for the Ultimate edition. Are you sure your coworker has it on Pro? 回答2: Intellitrace is not available in Microsoft Visual Studio Professional version, intellitrace is available in Visual Studio Ultimate edition only. 回答3: Yes, you can have Intellitrace in Visual Studio 2013

Using std::move to send a std::unique_ptr to std::thread in VS1012

心不动则不痛 提交于 2019-12-19 13:09:08
问题 The following gives me an error in visual studio 2012. void do_something(std::unique_ptr<int> i); std::unique_ptr<int> i(new int); std::thread(do_something, std::move(i)); Error 3 error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>' c:\program files (x86)\microsoft visual studio 11.0\vc\include\functional 1152 1 scratch It is helpfully(!) pointing at this definition in functional: _VARIADIC_EXPAND_0X(_CLASS_BIND, , , , ) This

Unable to Start Debugging. visual studio 2012 prompt after one time debug

半世苍凉 提交于 2019-12-19 12:24:32
问题 I am getting this error " Unable to Start Debugging " in visual studio 2012. I have also update the remote debugging sp2. also uninstalled and reinstalled vs2012 and added sp. still facing the same issue. My operating system is windows-8 64 bit. Also tried to run in Administrator user still the same. Unable to Start Debugging. visual studio 2012 回答1: Save your work, close Visual Studio then reopen your project 回答2: I had the same problem in my Visual Studio 2013. The solution I found is easy.