Hi,

I'm not clear as to when memory is allocated from the stack, free store or data area.Can someone please elaborate?

Recommended Answers

All 2 Replies

Definitely read the links provided above but the short answer to your question is that pointers point to data stored on the stack and everything else is on the program stack. But remember, the pointer is on the stack and the data it points to is on the heap. For a brief pointer overview see this site

http://coutblog.blogspot.com/2009/10/pointers-explained.html

For beginner programmers the only time they really need to worry about this is when they are using pointers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.