visual-studio-2008

Delete any container using templates

自闭症网瘾萝莉.ら 提交于 2019-12-22 04:07:36
问题 I have a lot of code where I am deleting vector containers that have pointers in them, that is, I have to delete all the pointers first and then clear the container. Every time I would iterate through and delete the pointers manually (I am aware of stl::algorithms for_each). To circumvent all that code, I created a template for deleting all vector containers that have a pointer. So far so good. Now I have several more container types including maps, concurrent containers etc. all with the

Delete any container using templates

泪湿孤枕 提交于 2019-12-22 04:06:59
问题 I have a lot of code where I am deleting vector containers that have pointers in them, that is, I have to delete all the pointers first and then clear the container. Every time I would iterate through and delete the pointers manually (I am aware of stl::algorithms for_each). To circumvent all that code, I created a template for deleting all vector containers that have a pointer. So far so good. Now I have several more container types including maps, concurrent containers etc. all with the

Visual studio won't debug into referenced DLL (from same solution)

坚强是说给别人听的谎言 提交于 2019-12-22 03:51:21
问题 I have a Visual studio 2008 solution, with 2 projects. A DLL, A, and a Web application, B. B has a project reference to A, and A.dll and A.pdb are being copied to B's bin/ directory. Everything is set to compile in debug mode. I can run the cassini webserver and debug web application B fine, but when I come to call a method in A.dll, pressing F11 to step into it does not step into it, it steps over it. I want to step into it. Any ideas why I might not be able to step into the source code of A

Frequent Access Denied to Temporary ASP.NET Files

天涯浪子 提交于 2019-12-22 03:24:15
问题 Literally every second time I run a big ugly web site project, I get an UnauthorizedAccessException, with a message pointing to a DLL, e.g. Temporary ASP.NET Files\ctheweb\0d76d363\4695c81f\App_Web_vi6bbbpy.dll' is denied. I then stop and restart the project, and it runs fine. I do some testing, debugging, fixing, run it again, and get the error again. I'm inclined to add a pre-build command to just clear that directory, but I always prefer to solve a problem with something other than a

Function call jumps to the wrong function

余生长醉 提交于 2019-12-22 02:32:42
问题 I am compiling a c++ static library in vs2008, and in the solution i also have a startup project that uses the lib, and that works fine. But when using the lib in another solution i get an run-time check failure. "The value of ESP was not properly saved across a functioncall" Stepping through the code i noticed a function foo() jumping to bar() instead right before the crash. The functions in question are just regular functions and no function pointers. Anyone has any clue what might be going

Function call jumps to the wrong function

夙愿已清 提交于 2019-12-22 02:32:40
问题 I am compiling a c++ static library in vs2008, and in the solution i also have a startup project that uses the lib, and that works fine. But when using the lib in another solution i get an run-time check failure. "The value of ESP was not properly saved across a functioncall" Stepping through the code i noticed a function foo() jumping to bar() instead right before the crash. The functions in question are just regular functions and no function pointers. Anyone has any clue what might be going

How to get Resharper to use Visual Studio's snippets

狂风中的少年 提交于 2019-12-22 02:04:31
问题 I installed Resharper in VS2008 and it seems to have taken over some of the snippets I've come to rely on. For instance, prop, foreach, etc... How can I tell Resharper to let VS2008 use its own snippets or at least not to overwrite snippets that already exist. Better yet, is there a way to selectively tell Resharper which snippets it can overwrite and which it shouldn't? I know about the Live Templates menu item that lets you pick and choose, but after deselecting 'foreach', for example, VS

How do I start a second console application in Visual Studio when one is already running

瘦欲@ 提交于 2019-12-22 01:39:54
问题 I am working through some examples in a WCF book. There is a Host project and Client project within a single solution. Both are console applications. The Host is the startup app, but the Client app doesn't seem to open the Console like the book says. Book says while the Host is running, run the Client. The Run button is disabled tho as it is already running. The book example definitely has them in the same solution and a single instance of Visual Studio. Anyways, what am I missing here? I

System.Web.HttpContext not recognized

有些话、适合烂在心里 提交于 2019-12-22 01:23:54
问题 I have a ASP.NET with C# web application. One of the classes I created needs to use HttpContext. According to http://msdn.microsoft.com/en-us/library/system.web.httpcontext(v=vs.90).aspx, HttpContext exists in the System.Web namespace in .NET 3.5 (which is the version I have installed). However, when I write HttpContext. --> I don't see autocomplete. Which is what tells me that HttpContext is not recognized. I did my homework and looked for usual solutions: 1. I added System.Web reference (by

Release mode Vs DEbug mode in MS Visual Studio Windows

江枫思渺然 提交于 2019-12-22 01:20:02
问题 I am using MSVS 9 (VS 2008). My application as well as shared library(dll)(I am using to link with my application) is also of c++ environment. Now observe the below cases: when the shared library/dll is built in Debug mode and my application is also built in Debug mode Result: Application executed successfully when the shared library/dll is built in Release mode and my application is also built in Release mode Result: Application executed successfully when the shared library/dll is built in