|
|
|
|
|
by Someone
1141 days ago
|
|
Switching to C++ gets you lots of things that aren’t “C-like” (that, of course, is a vague term that, as this thread shows, people will disagree about, but I think there’s consensus that C++ has many features that aren’t C-like), and may get you subtle bugs because of small incompatibilities between C and C++. For example, sizeof('x') is 1 in C++, but >1 in C because 'x' is a char in C++ and an int in C. https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B |
|