Click here to Skip to main content
15,915,760 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: able [modified] Pin
_AnsHUMAN_ 4-Jun-06 23:15
_AnsHUMAN_ 4-Jun-06 23:15 
QuestionWindow on Dialog Pin
Manjunath S4-Jun-06 22:56
Manjunath S4-Jun-06 22:56 
AnswerRe: Window on Dialog Pin
Hamid_RT4-Jun-06 23:08
Hamid_RT4-Jun-06 23:08 
AnswerRe: Window on Dialog [modified] Pin
_AnsHUMAN_ 4-Jun-06 23:08
_AnsHUMAN_ 4-Jun-06 23:08 
AnswerRe: Window on Dialog Pin
Nishad S4-Jun-06 23:16
Nishad S4-Jun-06 23:16 
QuestionRe: Window on Dialog Pin
Manjunath S4-Jun-06 23:16
Manjunath S4-Jun-06 23:16 
AnswerRe: Window on Dialog Pin
Nishad S4-Jun-06 23:22
Nishad S4-Jun-06 23:22 
QuestionRe: Window on Dialog Pin
Manjunath S4-Jun-06 23:31
Manjunath S4-Jun-06 23:31 
AnswerRe: Window on Dialog Pin
Nishad S4-Jun-06 23:49
Nishad S4-Jun-06 23:49 
AnswerRe: Window on Dialog Pin
_AnsHUMAN_ 4-Jun-06 23:24
_AnsHUMAN_ 4-Jun-06 23:24 
GeneralRe: Window on Dialog Pin
Nishad S4-Jun-06 23:27
Nishad S4-Jun-06 23:27 
AnswerRe: Window on Dialog Pin
_AnsHUMAN_ 4-Jun-06 23:31
_AnsHUMAN_ 4-Jun-06 23:31 
QuestionRe: Window on Dialog Pin
Manjunath S4-Jun-06 23:47
Manjunath S4-Jun-06 23:47 
Questionabout edit box Pin
yogendra kaushik4-Jun-06 22:55
yogendra kaushik4-Jun-06 22:55 
AnswerRe: about edit box Pin
_AnsHUMAN_ 4-Jun-06 22:59
_AnsHUMAN_ 4-Jun-06 22:59 
AnswerRe: about edit box Pin
Hamid_RT4-Jun-06 23:05
Hamid_RT4-Jun-06 23:05 
AnswerRe: about edit box Pin
ThatsAlok5-Jun-06 0:26
ThatsAlok5-Jun-06 0:26 
Questionconfused about system stack Pin
George_George4-Jun-06 22:54
George_George4-Jun-06 22:54 
AnswerRe: confused about system stack Pin
Viorel.5-Jun-06 0:19
Viorel.5-Jun-06 0:19 
GeneralRe: confused about system stack [modified] Pin
George_George5-Jun-06 1:38
George_George5-Jun-06 1:38 
GeneralRe: confused about system stack [modified] Pin
Viorel.5-Jun-06 2:05
Viorel.5-Jun-06 2:05 
GeneralRe: confused about system stack [modified] Pin
George_George5-Jun-06 2:24
George_George5-Jun-06 2:24 
GeneralRe: confused about system stack [modified] Pin
Viorel.5-Jun-06 3:18
Viorel.5-Jun-06 3:18 
GeneralRe: confused about system stack [modified] Pin
George_George5-Jun-06 3:38
George_George5-Jun-06 3:38 
GeneralRe: confused about system stack [modified] Pin
Viorel.5-Jun-06 3:58
Viorel.5-Jun-06 3:58 
Data segment is a storage for named variables, declared like "int x = 0;" or "static int x = 0;" outside functions, or as "static int x = 0;" inside functions. Data segment also stores initial value of arrays, like "Hello, World!" for strings, or {1, 2, 3} for integer arrays. This data segment is allocated once, when process starts, and the number of variables here cannot grow.

(One more thing which is stored in data segment is "virtual tables" of classes having virtual functions).

Heap area is for unnamed variables, allocated only when you explicitly call new or related. So the number of variables varies here during program execution.

While variables declared in global data segment can be accessed by name, the variables allocated in heap have to be accessed by pointers or references.

So the main difference between global data segment and heap is that the size of data segment is fixed, while the data allocated in the heap can vary.

That is my understanding.

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.