2 ms·
C++ isn't compatible C, it never was. There's lots of valid C code that isn't valid C++. For instance, this line: int *new = malloc(sizeof(int)); is valid
by OskarS 10y ago
C++ isn't compatible C, it never was. There's lots of valid C code that isn't valid C++. For instance, this line:
int *new = malloc(sizeof(int));
is valid C but invalid C++ for two different reasons: "new" is a keyword in C++, so you can't use it as an identifier, and C++ doesn't allow implicit casts from void*, while C does.
- deleted 10y ago[deleted]