A89: C/C++ [slightly OT]


[Prev][Next][Index][Thread]

A89: C/C++ [slightly OT]




I went back to Barnes and Noble today and took a look at Stroustroup's
book - here's some C code that is different in C++, from appendix B of the
book:

c = a//*d*/b
    ;

is interpreted as "c = a;" in C++ and "c = a/b;" in C

Also, in C++ sizeof('b') == sizeof(char), while in C sizeof('b') ==
sizeof(int)

There's some real code that a normal person might actually write that could
be misinterpreted there having to do with the discrepancies in C's sloppy
type system (roughly paraphrased), but I didn't understand them.  Does
anyone have the book?

    -Scott