By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 2,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

char * const &szKey

P: n/a
Kip
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)
{
Dec 24 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Kip wrote:
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)


szFoo is a reference to a const pointer to char.

i.e.

char str[100];

char * const str_ptr = str;

StringHash( str_ptr )
Dec 24 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.