MS VS 2008 and C Programming?

Lord Banshee

Golden Member
Sep 8, 2004
1,495
0
0
OK well i have been writing some code using MS VS 2008 to test the functionality, but when i transferred to the server that will be running the code it uses C compiler. So i am going to have to change some code syntax here and there (nothing too bad, as i was using just standard C++ syntax).

So my question is is there a way to get the MS VS 2008 to compile my code as C99 (?) code. It would be much easier to use the MS VS 2008 IDE to find bugs then using text base compiler on the server.

Also is there any website or free e-books that cover just C code? It is funny how little things are different and it would save me a lot of time if i did not have to google a new search for every syntax issue i run in to.

Thanks
 

Lord Banshee

Golden Member
Sep 8, 2004
1,495
0
0
Found an option that will compile as C:
Properties
-Config Properties
--C/C++
---Advanced
----Compile As = Compile as Code (/TC)

now to find all the syntax in one spot
 

kylef

Golden Member
Jan 25, 2000
1,430
0
0
I would read through appendix B of Stroustrup. He covers the major differences between C and C++, including those small portions of C which are not strictly subsets of C++.

Plus, in section B.2.4 he enumerates all of the C++ facilities which aren't available in ANSI C. He also calls out what differences are "being added to C", implying that they would go into the next C specification (which became C99). For example, "//" style comments.
 

Lord Banshee

Golden Member
Sep 8, 2004
1,495
0
0
thanks and how did you know i had that book :p

I already finished all my converting but thanks it will be helpful in the future.