tag:blogger.com,1999:blog-8821846818714029393.post1637639729418234244..comments2023-09-01T15:39:56.690+02:00Comments on pts.blog: It is a misconception that C++ is a superset of CUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8821846818714029393.post-91438769783052541362011-09-25T16:40:24.268+02:002011-09-25T16:40:24.268+02:00While this is not a very neat example (it generate...While this is not a very neat example (it generates warnings with newer GCCs), it is also correct code and serves the same purpose:<br /><br />#include <br />int main(void) { int a = 6 //* divide in C */3;<br />+2; if (a == 2) printf("C\n"); else printf("C++\n"); return 0; }<br /><br />Sorry for the badly formatted code, but I don't know how to keep neat indentation here.Rogério Theodoro de Britohttps://www.blogger.com/profile/17178613673298541423noreply@blogger.com