Set Visual Studio 2015 Compiler to VS 2010 version - c++

I'm a student and i'm using Visual Studio 2015 to learn C++.
I need to set my compiler so it will check my code the same as Visual Studio 2010's compiler so no errors show up on my disciple's end who was instructed to check our code in 2010 environment.
Is there any way i can do that?
sorry for any bad English and i hope you understand my question.
thanks in advance!

Yes it is possible by changing "Platform Toolset":
Full details here
EDIT:
As correctly mentioned by #HansPassant in the comment you need VS2010 toolset installed. You can download and install VS2010 C++ Express edition

Related

Visual Studio 2017 - IntelliSense is missing: ObjectDescription, Comments, Exceptions

In Visual Studio 2017 the IntelliSense menu is missing the Object Description, the Comments, and the Exceptions as per the following
If I do the same in Visual Studio 2015, then I see it.
I have checked the Settings, but nothing found to change that my C# works fine as VS2015.
After I have opened an older Project with VS2017 that was build on .net 4.5.2 and the IntelliSense with all XML Comments works, I installed Microsoft .NET Framework 4.6.2 Developer Pack und Language Packs and the Problem was fixed.
So my Problem was that the Developer Pack for .Net 4.6.2 was not installed on my machine, only the Redistributable Package was installed.
I hope this answer can help other people with the same mistake.

Where is the place to add c++ Preprocessor Directives in Visual Studio 2015 Enterprise?

I saw questions similar to this for older versions of Visual Studio but not this latest version. I am following a course on Lynda.com and basically the instructor is trying to use C++ in a pure form that will look the same for students using a visual IDE on Mac. Anyway, the instructor sets up a Working project for teaching the language constructs and such. He right clicks on the project in Visual Studio and under C++ there is Pre-processor section.
I should note that he is using VS 2013 Community Edition. I have a more fully featured version of VS 2015. I don't see that option for defining pre-processor directives on a "project" basis. MS won't let me install 2 copies of VS 2015, but maybe it will let me install VS 2013.
Still, I hope my question makes enough sense as to what we are trying to accomplish, so that I can find the option in VS 2015 Enterprise.
Thanks,
Bruce
You would need to at least add a .cpp file to your Source Files folder in the the current project that you right will click. That should give you the option you are looking for in Visual Studio 2015.
Right click on your project. Select Properties. You should see the below menu where you can navigate to Configuration Properties > C/C++ > Preprocessor.
This is how I see it in my Visual Studio Enterprise 2015.
Is this what you're looking for?

Cannot open include file 'afxwin.h':no such header fileor directory in vs 2013 c++

So,I am trying to port some old code to newer version of vs so I imported the sln of the project into my vs 2013 and I get this error and some others and I have gone through some of the other questions on this forum.So I understand that this has something to do with MFC(microsoft foundation classes) but all of them talk about vs 2010 express edition which doesn't include MFC module.I am currently using vs 2013 community edition which is supposed to have full feature access of vs.Still I get this error so please help!!
Thanks!
While installing Visual Studio 2013, you need to select the MFC option:

How to correctly install platform toolsets

I know there are tons of other threads about it, but I couldn't find any which could help me.
So I've got VS2013 Ultimate installed. I've got an old project which works with only VS2008SP1. On other compilers it has compatibility issues which I don't want to bother with. So I would like to try to compile it from 2013 with 2008 tools, so I hope I can compile it without uninstalling my current VS2013.
So, if I install VS2008, will this overwrite my current 2013 or just getting added as a toolset?
If I use 2008 toolset, will this work the same way as I had a VS2008?
Do I have to do something else to make it work?
And just a secondary question which is not related to may current question at all:
If I compile a lib with VS2013, can I use this lib in my VS2008 Project, or do I have to compile the lib with VS2008 too?
Thank you for your answers!
Microsoft doesn't recommend installing VS 2008 if you already have VS 2013 installed. In general they say:
We recommend that you install Visual Studio versions in the order in
which they were released. For example, install Visual Studio 2012
before you install Visual Studio 2013.
http://msdn.microsoft.com/en-us/library/ms246609.aspx
So, to answer your question: you probably should uninstall VS 2013, but you can install it again after installing VS 2008. Before doing that though it might be a good idea to clean the register as well as file leftovers from VS 2013 to avoid compatibility problems.
And yes, you can use 2008 compiler in 2013 version. There are a plenty of SO thread about it, e.g. :
Use Visual Studio 2012 and compile with older platform toolset?
How can I use Visual Studio 2010 with the Visual C++ 2008 compiler?
If I compile a lib with VS2013, can I use this lib in my VS2008
Project, or do I have to compile the lib with VS2008 too?
You have to compile this lib in VS 2008, if you want to use it with VS 2008.

how to set up visual studio 2005 for cuda programming

I have tried to setup my visual studio environment for programming with cuda,but stil I m getting the errors as cudaMemcpy is unable to resolve..
If any of you plz help me in setting up the environment.I am coding in c++.
Thanks in advance.
Check out this answer for instructions for Visual Studio 2005 and 2008 (for VS2010, see this answer).
In particular, see the bit about adding the CUDA runtime library to your link dependencies.