Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 24th, 2005, 01:25 AM
Kip
Guest
 
Posts: n/a
Default char * const &szKey

Greetings,

Could anyone explain to me how the parameter type works here? I am also
interested in the technical details of what is actually happening on
the stack. I have never seen a "char * const &szFoo". I usually just
use "char *pszFoo" whenever I want to pass a string, or maybe "const
char *pszFoo" if I know that I won't modify it. Thanks.

// Hash a string...
unsigned int StringHash(char * const &szFoo)
{
  #2  
Old December 24th, 2005, 04:35 AM
Gianni Mariani
Guest
 
Posts: n/a
Default Re: char * const &szKey

Kip wrote:[color=blue]
> Greetings,
>
> Could anyone explain to me how the parameter type works here? I am also
> interested in the technical details of what is actually happening on
> the stack. I have never seen a "char * const &szFoo". I usually just
> use "char *pszFoo" whenever I want to pass a string, or maybe "const
> char *pszFoo" if I know that I won't modify it. Thanks.
>
> // Hash a string...
> unsigned int StringHash(char * const &szFoo)[/color]

szFoo is a reference to a const pointer to char.

i.e.

char str[100];

char * const str_ptr = str;

StringHash( str_ptr )
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles