Click here to Skip to main content
16,004,192 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: structure questions Pin
Dennis L8-Aug-08 5:21
Dennis L8-Aug-08 5:21 
AnswerRe: structure questions Pin
Matthew Faithfull8-Aug-08 5:30
Matthew Faithfull8-Aug-08 5:30 
GeneralRe: structure questions Pin
Dennis L8-Aug-08 5:39
Dennis L8-Aug-08 5:39 
AnswerRe: structure questions Pin
Matthew Faithfull8-Aug-08 5:54
Matthew Faithfull8-Aug-08 5:54 
GeneralRe: structure questions Pin
Dennis L8-Aug-08 5:25
Dennis L8-Aug-08 5:25 
AnswerRe: structure questions Pin
Matthew Faithfull8-Aug-08 5:36
Matthew Faithfull8-Aug-08 5:36 
GeneralRe: structure questions Pin
Dennis L8-Aug-08 5:55
Dennis L8-Aug-08 5:55 
GeneralRe: structure questions Pin
Matthew Faithfull8-Aug-08 6:02
Matthew Faithfull8-Aug-08 6:02 
OK but if you use a member instance
<br />
class CMyClass<br />
{<br />
private:<br />
 KEY k; <br />
};<br />

then k is allocated wherever the instance of your class is allocated. You can use
heap
<br />
CMyClass* pMyInstance = new CMyClass();<br />

or stack
<br />
CMyClass MyInstance;<br />


If you're allocating really large amounts of data you definitely need the heap, possibly even look into the Virtual Memory API. In general its often best to leave the decision on where to allocate data up to the code that uses the data rather than trying to make it part of the data.

"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)

AnswerRe: structure questions Pin
Perspx8-Aug-08 5:37
Perspx8-Aug-08 5:37 
QuestionRe: structure questions Pin
Perspx8-Aug-08 4:53
Perspx8-Aug-08 4:53 
AnswerRe: structure questions Pin
roel_8-Aug-08 6:03
roel_8-Aug-08 6:03 
QuestionMake mfc aplication installer Pin
yoel good8-Aug-08 2:42
yoel good8-Aug-08 2:42 
AnswerRe: Make mfc aplication installer Pin
toxcct8-Aug-08 2:51
toxcct8-Aug-08 2:51 
GeneralRe: Make mfc opengl aplication installer Pin
yoel good9-Aug-08 18:19
yoel good9-Aug-08 18:19 
AnswerRe: Make mfc aplication installer Pin
Perspx8-Aug-08 3:02
Perspx8-Aug-08 3:02 
AnswerRe: Make mfc aplication installer Pin
vikas amin8-Aug-08 9:58
vikas amin8-Aug-08 9:58 
QuestionImpersonateLoggedOnUser() on Vista 64? Pin
sandeepkavade8-Aug-08 2:39
sandeepkavade8-Aug-08 2:39 
QuestionDrive Name Pin
Davitor8-Aug-08 2:18
Davitor8-Aug-08 2:18 
AnswerRe: Drive Name Pin
Perspx8-Aug-08 2:27
Perspx8-Aug-08 2:27 
GeneralRe: Drive Name Pin
Davitor8-Aug-08 2:48
Davitor8-Aug-08 2:48 
QuestionCan i disable CEdit context menu ? Pin
Le@rner8-Aug-08 0:35
Le@rner8-Aug-08 0:35 
AnswerRe: Can i disable CEdit context menu ? Pin
SandipG 8-Aug-08 0:45
SandipG 8-Aug-08 0:45 
AnswerRe: Can i disable CEdit context menu ? Pin
-Dy8-Aug-08 2:12
-Dy8-Aug-08 2:12 
GeneralRe: Can i disable CEdit context menu ? Pin
SandipG 8-Aug-08 3:14
SandipG 8-Aug-08 3:14 
QuestionHow can i handle restore button of applicaton? Pin
Le@rner7-Aug-08 23:42
Le@rner7-Aug-08 23:42 

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.