Click here to Skip to main content
15,921,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: need to write a panel(a custom control) to load and unload controls? Pin
Jun Du7-Jun-06 5:25
Jun Du7-Jun-06 5:25 
AnswerRe: need to write a panel(a custom control) to load and unload controls? Pin
old_dustman7-Jun-06 17:11
old_dustman7-Jun-06 17:11 
QuestionRetrieving Machine ID Pin
SachinBhave7-Jun-06 3:34
SachinBhave7-Jun-06 3:34 
AnswerRe: Retrieving Machine ID Pin
_AnsHUMAN_ 7-Jun-06 3:42
_AnsHUMAN_ 7-Jun-06 3:42 
GeneralRe: Retrieving Machine ID Pin
David Crow7-Jun-06 4:15
David Crow7-Jun-06 4:15 
AnswerRe: Retrieving Machine ID Pin
Viorel.7-Jun-06 3:54
Viorel.7-Jun-06 3:54 
QuestionPlz Advice Pin
Krishnatv7-Jun-06 3:11
Krishnatv7-Jun-06 3:11 
AnswerRe: Plz Advice Pin
_AnsHUMAN_ 7-Jun-06 3:27
_AnsHUMAN_ 7-Jun-06 3:27 
GeneralRe: Plz Advice Pin
Krishnatv7-Jun-06 19:35
Krishnatv7-Jun-06 19:35 
AnswerRe: Plz Advice Pin
ThatsAlok7-Jun-06 20:10
ThatsAlok7-Jun-06 20:10 
QuestionBlitting a palettized surface to a none palettized surface Pin
Remco Hoogenboezem7-Jun-06 3:09
Remco Hoogenboezem7-Jun-06 3:09 
QuestionLook and Feel Pin
vinod.sankuthodi7-Jun-06 3:04
vinod.sankuthodi7-Jun-06 3:04 
AnswerRe: Look and Feel Pin
David Crow7-Jun-06 3:19
David Crow7-Jun-06 3:19 
AnswerRe: Look and Feel Pin
Michael Dunn7-Jun-06 3:30
sitebuilderMichael Dunn7-Jun-06 3:30 
AnswerRe: Look and Feel [modified] Pin
FarPointer7-Jun-06 3:31
FarPointer7-Jun-06 3:31 
GeneralRe: Look and Feel Pin
Andy Rama13-Jun-06 3:50
Andy Rama13-Jun-06 3:50 
GeneralRe: Look and Feel Pin
FarPointer13-Jun-06 21:11
FarPointer13-Jun-06 21:11 
AnswerRe: Look and Feel Pin
ThatsAlok7-Jun-06 22:24
ThatsAlok7-Jun-06 22:24 
QuestionMediaplayer and COM Pin
TheMason7-Jun-06 3:04
TheMason7-Jun-06 3:04 
AnswerRe: Mediaplayer and COM [modified] Pin
_AnsHUMAN_ 7-Jun-06 3:30
_AnsHUMAN_ 7-Jun-06 3:30 
AnswerRe: Mediaplayer and COM Pin
TheMason8-Jun-06 5:36
TheMason8-Jun-06 5:36 
Question'The heck? How is 14==4? Pin
Lord Kixdemp7-Jun-06 2:11
Lord Kixdemp7-Jun-06 2:11 
AnswerRe: 'The heck? How is 14==4? Pin
kakan7-Jun-06 2:15
professionalkakan7-Jun-06 2:15 
AnswerRe: 'The heck? How is 14==4? Pin
Cedric Moonen7-Jun-06 2:15
Cedric Moonen7-Jun-06 2:15 
AnswerRe: 'The heck? How is 14==4? Pin
Alton Williams7-Jun-06 2:33
Alton Williams7-Jun-06 2:33 
The reason is because your using the sizeof operator to request the size of the array an not the pointer

eg:
<code>#include <iostream.h>
void main() // returning a void is NOT recomended
{
  char *pszSite = "Code project";
  cout << "The size of string is: " << (sizeof)pszSite << endl; // prints 12
  cout << "The size of character is: " << (sizeof)*pszSite << endl; // prints 1
  cout << "The size of pointer is: " << (sizeof)&pszSite << endl; // prints 4
}</code>


In other words with using pointers to chars

  • No prefix operator treats it as a string.
  • Deferencing (asterisk) operator means get the contents to where it is
    pointing to.
  • Address of (ampersand) operator means get the actual address of the
    pointer


I hope that makes sense
Alton

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.