Discussion:
C verus C++ lexical differences
(too old to reply)
beginthreadex
2009-08-19 17:38:47 UTC
Permalink
Does anyone know of a document that outlines the differences in C to
C++ from a lexical standpoint?

*) put all variable declarations at the top of functions.
*) etc.
Bo Persson
2009-08-19 20:06:58 UTC
Permalink
Post by beginthreadex
Does anyone know of a document that outlines the differences in C to
C++ from a lexical standpoint?
*) put all variable declarations at the top of functions.
*) etc.
Which C version? :-)

Perhaps this page will ehlp:

http://david.tribble.com/text/cdiffs.htm



Bo Persson
beginthreadex
2009-08-19 20:55:26 UTC
Permalink
I was thinking the one that's with Visual Studio 2008.
Post by Bo Persson
Post by beginthreadex
Does anyone know of a document that outlines the differences in C to
C++ from a lexical standpoint?
*) put all variable declarations at the top of functions.
*) etc.
Which C version? :-)
http://david.tribble.com/text/cdiffs.htm
Bo Persson
Scot T Brennecke
2009-08-20 03:36:13 UTC
Permalink
This is not Visual C/C++-specific, but unless you are a real stickler for the really esoteric nuances, it shouldn't matter:
Stroustrup: FAQ:
http://www.research.att.com/~bs/bs_faq.html#C-is-better

If you have VC++ 9.0 (VS 2008), you have a compiler that is highly compliant with the C++ Standard.
Post by beginthreadex
I was thinking the one that's with Visual Studio 2008.
Post by Bo Persson
Post by beginthreadex
Does anyone know of a document that outlines the differences in C to
C++ from a lexical standpoint?
*) put all variable declarations at the top of functions.
*) etc.
Which C version? :-)
http://david.tribble.com/text/cdiffs.htm
Bo Persson
Ben Voigt [C++ MVP]
2009-08-20 13:22:20 UTC
Permalink
Post by Scot T Brennecke
This is not Visual C/C++-specific, but unless you are a real stickler
http://www.research.att.com/~bs/bs_faq.html#C-is-better
If you have VC++ 9.0 (VS 2008), you have a compiler that is highly
compliant with the C++ Standard.
C++03, yes. But not C99. Hence Bo asking which 'C' version.
Post by Scot T Brennecke
Post by beginthreadex
I was thinking the one that's with Visual Studio 2008.
Post by Bo Persson
Post by beginthreadex
Does anyone know of a document that outlines the differences in C
to C++ from a lexical standpoint?
*) put all variable declarations at the top of functions.
*) etc.
Which C version? :-)
http://david.tribble.com/text/cdiffs.htm
Bo Persson
Loading...