I appreciate the differences are negligible, but im doing some number crunching and so i want to use C. Ive just created a project in VS2010, chosen a C++ project and written some C. All executes fine, but
is this being created and executed in the fast(er) C compiler or the C++ because its a C++ project?
How can i specify that the code i wish to write is actually C and to be compiled and run as C?
The Visual Studio C++ compiler will treat all .c files as C language files and compile them as such.
Additional reference:
By default, the Visual C++ compiler treats all files that end in .c as C source code, and all files that end in .cpp as C++ source code. To force the compiler to treat all files as C regardless of file name extension, use the /Tc compiler option.
http://msdn.microsoft.com/en-us/library/bb384838.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With