'\' is the called the escape character in c/c++ - this means that it has
special meaning within a string literal - for instance '\n' = newline
character so "Fergal\nMoran" would actually be
"Fergal
Moran" - Get it?

However - if a character that we wish to put into a string is a special
character like \ or ? we "escape it" by putting \ in front of it - therefore
if we wanted the string "Here is a slash - \" we would have to write "Here
is a slash - \\"

Therefore ? within a string is represented as \? to tell us that we REALLY
mean ? and not the escape sequence ? .. - Get it?

Fergal....

> -----Original Message-----
> From: S.V.BADARI NARAYANA MURTHY [mailto:[EMAIL PROTECTED]]
> Sent: 04 December 2000 20:19
> To: Palm Developer Forum
> Subject: Storing "?" into a Char*

> 
> 
> hai all
> 
>    I want to store "?" into a Char*. if i give like this
> 
>       Char* temp;
>       temp="?";
> 
>      it will store "\?". why its adding \ before ?. how to 
> store only "?". if
> any one have idea regarding this, please help me.
> 
> 
> bye
> 
> Murthy
> 
> ____________________________________________________________________
> Get free email and a permanent address at 
> http://www.netaddress.com/?N=1
> 
> -- 
> For information on using the Palm Developer Forums, or to 
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
> 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to