Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
jki275
6y ago
0 comments
Save
Share
C++ is not a strict superset of C anymore. You can't compile all C in a C++ compiler.
0 comments
4 comments · 2 top-level
top
newest
oldest
leetcrew
6y ago
· 1 in thread
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
· 1 in thread
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