C++ Concepts that Hard to Grasp
Related Quora QA
Pointers, especially function pointers and multiple pointers (e.g.
int(\*)(void\*), void\***
)The const keyword and const correctness (e.g. what is the difference between
const char\*
,char\* const
andconst char\* const
, and what doesvoid class::member() const;
mean?)Memory allocation (e.g. every pointer
new
'ed should be deleted,malloc/free
should not be mixed withnew/delete
, when to usedelete []
instead ofdelete
, why the C functions are still useful (e.g.expand()
,realloc()
))Scope (i.e. that you can use
{ }
on its own to create a new scope for variable names, rather than just as part of if, for etc...)Switch statements. (e.g. not understanding that they can optimise as well (or better in some cases) than chains of ifs, not understanding fall through and its practical applications (loop unrolling as an example) or that there is a default case)
Calling conventions (e.g. what is the difference between
cdecl
andstdcall
, how would you implement a pascal function, why does it even matter?)Inheritance and multiple inheritance and, more generally, the entire OO paradigm.
Inline assembler, as it is usually implemented, is not part of C++.
Interview with Bjarne
https://news.codecademy.com/bjarne-stroustrup-interview/
May finally get a hang of what pointer and reference are about.