none
Using C compiler in Visual Studio 2015 RRS feed

  • Question

  • I was advised to download Visual Studio 2015 when learning C. I cannot see a reference to C in it. I can see C++ & C#. Is Visual Studio 2015 suitable for C learning?

    Thanks

    Peter

    Saturday, November 28, 2015 2:43 AM

Answers

  • C is a subset of C++ (or C++ is a superset of C, depending on how you look at it).  This means that the Visual Studio C++ compiler is by definition a C compiler.  That is, you can create a "C++" Project that contains nothing but C code, and compile it with a C++ compiler.  See https://msdn.microsoft.com/library/bb384838(v=vs.110).aspx for more information.
    Saturday, November 28, 2015 4:17 AM
  • I was advised to download Visual Studio 2015 when learning C. I cannot see a reference to C in it. I can see C++ & C#. Is Visual Studio 2015 suitable for C learning?

    Thanks

    Peter


    If your source file has the extension .cpp, the compiler will treat it as a C++ file.  If the extension is .c, the compiler will treat it as plain C.
    Saturday, November 28, 2015 6:05 AM

All replies

  • C is a subset of C++ (or C++ is a superset of C, depending on how you look at it).  This means that the Visual Studio C++ compiler is by definition a C compiler.  That is, you can create a "C++" Project that contains nothing but C code, and compile it with a C++ compiler.  See https://msdn.microsoft.com/library/bb384838(v=vs.110).aspx for more information.
    Saturday, November 28, 2015 4:17 AM
  • I was advised to download Visual Studio 2015 when learning C. I cannot see a reference to C in it. I can see C++ & C#. Is Visual Studio 2015 suitable for C learning?

    Thanks

    Peter


    If your source file has the extension .cpp, the compiler will treat it as a C++ file.  If the extension is .c, the compiler will treat it as plain C.
    Saturday, November 28, 2015 6:05 AM
  • Thank you for that. I now fully understand.
    Monday, November 30, 2015 1:07 AM