Click here to Skip to main content
15,899,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problems again- Newbie Pin
Steve S31-May-06 0:45
Steve S31-May-06 0:45 
GeneralRe: Problems again- Newbie Pin
antonaras31-May-06 1:21
antonaras31-May-06 1:21 
AnswerRe: Problems again- Newbie Pin
Steve S31-May-06 4:15
Steve S31-May-06 4:15 
AnswerRe: Problems again- Newbie Pin
BadKarma31-May-06 1:37
BadKarma31-May-06 1:37 
GeneralRe: Problems again- Newbie Pin
antonaras31-May-06 1:43
antonaras31-May-06 1:43 
AnswerRe: Problems again- Newbie Pin
Hamid_RT31-May-06 1:56
Hamid_RT31-May-06 1:56 
QuestionFindNextPrinterChangeNotification - Invalid Handle Pin
P Gibson31-May-06 0:20
P Gibson31-May-06 0:20 
AnswerRe: FindNextPrinterChangeNotification - Invalid Handle Pin
NiceNaidu31-May-06 0:57
NiceNaidu31-May-06 0:57 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
NiceNaidu31-May-06 1:05
NiceNaidu31-May-06 1:05 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
P Gibson31-May-06 1:19
P Gibson31-May-06 1:19 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
NiceNaidu31-May-06 1:36
NiceNaidu31-May-06 1:36 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
P Gibson31-May-06 2:35
P Gibson31-May-06 2:35 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
Member 45238505-Apr-09 16:05
Member 45238505-Apr-09 16:05 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
pgibson0077006-Apr-09 0:55
pgibson0077006-Apr-09 0:55 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
Member 45238507-Apr-09 2:17
Member 45238507-Apr-09 2:17 
GeneralRe: FindNextPrinterChangeNotification - Invalid Handle Pin
honohsu14-Apr-09 15:24
honohsu14-Apr-09 15:24 
QuestionRe: FindNextPrinterChangeNotification - Invalid Handle Pin
David Crow31-May-06 5:25
David Crow31-May-06 5:25 
AnswerRe: FindNextPrinterChangeNotification - Invalid Handle Pin
pgibson00770031-May-06 9:08
pgibson00770031-May-06 9:08 
QuestionRe: FindNextPrinterChangeNotification - Invalid Handle Pin
David Crow31-May-06 9:18
David Crow31-May-06 9:18 
AnswerRe: FindNextPrinterChangeNotification - Invalid Handle Pin
pgibson00770031-May-06 10:54
pgibson00770031-May-06 10:54 
Questionabout const Pin
FlyWithYou31-May-06 0:11
FlyWithYou31-May-06 0:11 
AnswerRe: about const Pin
toxcct31-May-06 0:21
toxcct31-May-06 0:21 
AnswerRe: about const Pin
NiceNaidu31-May-06 0:23
NiceNaidu31-May-06 0:23 
AnswerRe: about const Pin
Sarath C31-May-06 0:35
Sarath C31-May-06 0:35 
GeneralRe: about const Pin
Emilio Garavaglia31-May-06 2:29
Emilio Garavaglia31-May-06 2:29 
That's partially correct.
The "string" litteral, in fact, stays in the BSS segmment (where all costant reside on the disk), loaded in memory as part of the EXE and exist for the entire life of the process.

It's acessiblilty happens trhoug an on-stack variable that is declared as a pointer to the BSS (first case) or as an array (on-stack) that is a copy of what stays in the BSS.
The most of the compiler optimize this (unspec. array size) by transforming such array into ... a pointer(!)

Just try to watch in the debugger what the pointer points to and what is the array address in bopth the case you don't declare a size or you do.

Then, declare an int just before the array and look its address: is it 4 bytes before the first array element?




2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:

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.