Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
jki275
6y ago
0 comments
Share
C++ is not a strict superset of C anymore. You can't compile all C in a C++ compiler.
0 comments
default
newest
oldest
leetcrew
6y ago
has c++ ever been a strict superset of c?
afaik,
int* arr = malloc(sizeof(int));
has never worked in c++.
jki275
OP
6y ago
It's probably never been a strict superset really.
mrr54
6y ago
To use a trivial example:
int free;
leetcrew
6y ago
care to explain which language this doesn't work in (and why)? I'm curious. AFAIK, `free` isn't a keyword in either language and this is just declaring an int variable with a legal identifier (but not initializing it).
j
/
k
navigate · click thread line to collapse