Click here to Skip to main content
15,885,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: insert bitmap on SDI Pin
Iain Clarke, Warrior Programmer23-Aug-09 4:23
Iain Clarke, Warrior Programmer23-Aug-09 4:23 
GeneralRe: insert bitmap on SDI Pin
Amin.Abdi23-Aug-09 4:34
Amin.Abdi23-Aug-09 4:34 
GeneralRe: insert bitmap on SDI Pin
Hamid_RT27-Aug-09 5:21
Hamid_RT27-Aug-09 5:21 
QuestionFunction overloading.. Pin
kumar sanghvi22-Aug-09 3:28
kumar sanghvi22-Aug-09 3:28 
AnswerRe: Function overloading.. Pin
Rajesh R Subramanian22-Aug-09 4:35
professionalRajesh R Subramanian22-Aug-09 4:35 
AnswerRe: Function overloading.. Pin
Stuart Dootson22-Aug-09 6:46
professionalStuart Dootson22-Aug-09 6:46 
Questionpointer Pin
kumar sanghvi21-Aug-09 23:56
kumar sanghvi21-Aug-09 23:56 
AnswerRe: pointer [modified] Pin
Rajesh R Subramanian22-Aug-09 0:05
professionalRajesh R Subramanian22-Aug-09 0:05 
kumar sanghvi wrote:
int *p;   //With this statement, you just declared a pointer variable (which will point to an integer)
int w=10; //You declared an integer and initialized it. The storage for this variable is on the stack.
p=&w;    //You made the integer pointer you earlier declared, point to the integer that you just created on the stack.


the memory allocation for both w and p will be on stack only ...?


Yes, in this case, the pointer is pointing to a memory location, which is on the stack.

kumar sanghvi wrote:
when it is really useful to allocate memory dynamically using pointer than allocating on the stack..?


Pointers are more useful when you need to allocate memory dynamically (typically you don't know how much memory you are going to need).


It is a crappy thing, but it's life -^ Carlo Pallini

modified on Sunday, August 23, 2009 2:11 PM

GeneralRe: pointer Pin
kumar sanghvi22-Aug-09 0:21
kumar sanghvi22-Aug-09 0:21 
GeneralRe: pointer Pin
Rajesh R Subramanian22-Aug-09 2:10
professionalRajesh R Subramanian22-Aug-09 2:10 
GeneralRe: pointer Pin
harold aptroot22-Aug-09 9:04
harold aptroot22-Aug-09 9:04 
GeneralRe: pointer Pin
Rajesh R Subramanian22-Aug-09 19:05
professionalRajesh R Subramanian22-Aug-09 19:05 
AnswerRe: pointer Pin
Rajesh R Subramanian22-Aug-09 19:06
professionalRajesh R Subramanian22-Aug-09 19:06 
AnswerRe: pointer Pin
harold aptroot23-Aug-09 7:54
harold aptroot23-Aug-09 7:54 
GeneralRe: pointer Pin
Rajesh R Subramanian23-Aug-09 8:13
professionalRajesh R Subramanian23-Aug-09 8:13 
GeneralRe: pointer Pin
harold aptroot23-Aug-09 8:40
harold aptroot23-Aug-09 8:40 
QuestionHRESULT:0x8007007E Pin
MozhdehQeraati21-Aug-09 18:32
MozhdehQeraati21-Aug-09 18:32 
AnswerRe: HRESULT:0x8007007E Pin
Code-o-mat21-Aug-09 22:03
Code-o-mat21-Aug-09 22:03 
AnswerRe: HRESULT:0x8007007E Pin
Hristo-Bojilov22-Aug-09 6:02
Hristo-Bojilov22-Aug-09 6:02 
GeneralRe: HRESULT:0x8007007E Pin
MozhdehQeraati23-Aug-09 18:11
MozhdehQeraati23-Aug-09 18:11 
GeneralRe: HRESULT:0x8007007E Pin
Hristo-Bojilov24-Aug-09 10:16
Hristo-Bojilov24-Aug-09 10:16 
QuestionCreating an object using a reference Pin
thelonesquirrely21-Aug-09 8:28
thelonesquirrely21-Aug-09 8:28 
AnswerRe: Creating an object using a reference Pin
Stuart Dootson21-Aug-09 9:48
professionalStuart Dootson21-Aug-09 9:48 
QuestionHow to join two data tables in different database Pin
jiabin_007_love21-Aug-09 7:17
jiabin_007_love21-Aug-09 7:17 
AnswerRe: How to join two data tables in different database Pin
David Crow21-Aug-09 9:24
David Crow21-Aug-09 9:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.