Did the author make a mistake in explaining stack and heap in C++ or am I misreading something?

The pointer variables pt and pd are stored on the stack. The values they point at, allocated with new, are stored on the heap.

If I write a sign with an arrow labelled “lake”, it doesn’t mean that the sign itself is a lake, nor that it must be mounted in a lake. Rather, it should be mounted on solid ground, pointing in the direction of the lake.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)