visual studio don't understand statements location on files containing big comments - c++

When the code file contains a lot of comments in different locations and in big blocks of lines, visual studio become unable to detect the lines correctly for compiler errors and for breakpoints when I remove these comments it work fine.
I faced this problem in the visual studio 2010 and now in 2012
I'm talking about c++ language files
Is this known behaviour in visual studio with C++ or not and how to fix it

Related

Source code for mainCRTStartup() in Visual C++

Not sure if I can ask this sort of question here, but I am interested in viewing the source code for mainCRTStartup() in Visual C++.
Did Microsoft made this source code available?
Have a look in %VSINSTALLDIR%VC\crt\src\vcruntime\, where %VSINSTALLDIR% would be something like C:\Program Files (x86)\Microsoft Visual Studio 14.0 for Visual Studio 2015 for example, so different depending on which version you are on, etc. The function you are asking for is in exe_main.cpp
If you are running through the Visual Studio debugger, a good tip is to hit F11, or in the main menu bar go: Debug -> Step Into, that will start debugging and break at the top of main. Then you can just go up the call stack to mainCRTStartup and the it should be able to find the source for you.

Visual Studio 2015 hangs when compiling and linking projects

I recently made the change to Visual Studio 2015 from Visual Studio 2012 as my compiler for my c++ projects. After making this change I have noticed that visual studio will frequently hang in the build process.
This never occurred with Visual Studio 2012. The hangups are at random points and do not occur at the same build points in my projects.
When I ran VS in administrator mode and got all of the cl.exe's and link.exe's to appear as command prompts I was able to see when they hung. And there were no errors thrown or anything.
The only way I have successfully worked around this issue is by setting Visual Studio's build process to only process one project at a time and use only one compilation simultaneously. However I cant maintain this as my build time is somewhere around 3-4 hours (Yes, this is a HUGE project).
I think this is a duplicate of Visual Studio 2015 Win64 hangs during solution build. I posted an answer there. In short, there may be a patch that resolves the issue:
https://www.microsoft.com/en-us/download/details.aspx?id=51161

New to C++, Visual Studios Professional 2013 can't run projects made in Visual Studios C++ Express 2010

And now, the projects that I tried to open and run (very basic projects - little more than learning programs like hello world type programs) in VS 2013 can't be opened and run in VS Express 2010 either. Everything is licensed properly.
In fact, when I open my program in VS Express 2010 now, it underlines basic things in the header like "iostream" in red, and doesn't recognize them.
If I build a new project in either, it's just fine. But I can't get projects to work across one from the other, and if I do try, it does some rebuild, and then those projects won't work in either.
What is going on?
Actually, that happened with me when I tried to use a project of gmap.net (winforms) that I made with Visual Studio 2013 into the new version of VS 2015.
Into my case, I could see all the code I had made in C#, but I couldn't change the design of the project and I think that it will be impossible so I have been working with both.
But in your case, if you want just open the code, you should find the file with .csproj or something similar to this and do not open the project by the .sln if you know what I mean.
Doing this it will work just fine. And of course, don't forget that you should import all extensions to your new VS.
PS:
I found a nice explation of your problem here at the Visual Studio website. And this was the answer:
If you allow Visual Studio to update the project automatically, you can open it in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1.

C++ - Visual Studio's compiler set up in Code::Blocks?

Honestly I like Code::Blocks (v13.12) much more than Visual Studio because it doesn't eat up my RAM. I was wondering: I recently installed Visual Studio 2012 Professional, and attempted to set the compiler up to work with Code::Blocks, but upon viewing the files included, I was missing a few critical C++ headers and, in addition, Microsoft's resource compiler, therefore I could not successfully get it working with Code::Blocks. There were no errors when I installed Visual Studio, so why would I be missing headers and their resource compiler? Are those not included in the professional version? Do I seriously need to get a copy of ultimate?

VS 2010 intellisense not working for upconverted project

We have a very big C++ solution with several projects for which intellisense works perfectly in Visual Studio 2008, but not at all in Visual Studio 2010 (not even for structs defined in the same file where they are used). I've verified that intellisense does work in VS 2010 for other projects on my machine. I've tried importing one of the problematic projects from a brand-new solution with no success. Re-building the project files from scratch seems promising, but it would require days of work to follow that path, with no guarantee of success at the end. Any alternative suggestions are welcome. The actual error message I get is:
"Intellisense: 'No additional information available'(See 'Troubleshooting IntelliSense in C++ Projects' for further help.)
I've tried that, but there's basically only one suggestion on the MSDN webpage, to make sure "stdafx.h" on the include path, but we're not using precompiled headers and don't include it from anywhere, so I'm pretty sure that's not the problem.
Have you deleted all of the generated database (.ncb and .sdf) files? Corrupted database files is the most likely cause of Visual Studio failing to display IntelliSense.
Intellisense was not included as a component of Visual Studio 2010 for C++/CLI. Unfortunately, it seems they are not going to support it soon either. This is an incredible detriment, as i find myself having to open VS2005 on occasion to simply find an object member.
Here is Microsoft's release on the subject:
http://blogs.msdn.com/b/vcblog/archive/2011/03/03/10136696.aspx