hi guys..

in c# when you want to deal with file path.. I will use "@"
str_FileName=@"c:\fwefwef\new filename";

in c++? which character should I use?

pls advise,
Nigil Chua

Re: constant key? by Heinz

Heinz
Wed Dec 17 07:15:41 CST 2003


"Nigil LaVey" <lavey@pacific.net.sg> schrieb im Newsbeitrag =
news:OLBLidJxDHA.560@TK2MSFTNGP11.phx.gbl...
: hi guys..
:=20
: in c# when you want to deal with file path.. I will use "@"
: str_FileName=3D@"c:\fwefwef\new filename";
:=20
: in c++? which character should I use?
:=20
: pls advise,
: Nigil Chua

There is no such feature in C/C++. You must either escape each backslash =
character like

str_FileName =3D "c:\\fwefwef\\new filename";

or use / instead of \, like

str_FileName =3D "c:/fwefwef/new filename";

Regards
Heinz


Re: constant key? by James

James
Wed Dec 17 12:51:38 CST 2003

In C#, the @ before a string constant means that "" (two double quotes)
is translated in a single double-quote, and no other translations are
done --- every other character is as it appears.

Without the @, in C# and in C++, \ means the character that immediately
follows it has a special meaning. For example, \t means the tab character
(0x09), \n means the line feed (0x0A) etc. Among these is \\ (double
backslash), which is translated into a single backslash.

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)
"Nigil LaVey" <lavey@pacific.net.sg> wrote in message
news:OLBLidJxDHA.560@TK2MSFTNGP11.phx.gbl...
> hi guys..
>
> in c# when you want to deal with file path.. I will use "@"
> str_FileName=@"c:\fwefwef\new filename";
>
> in c++? which character should I use?
>
> pls advise,
> Nigil Chua
>
>



Re: constant key? by Nigil

Nigil
Mon Dec 22 05:13:50 CST 2003

thanks guys....

should have thought that... just that I want some solid answer to get rid of
that thing from my mind....

best regards to all and have a happy holidays...:)

"Nigil LaVey" <lavey@pacific.net.sg> wrote in message
news:OLBLidJxDHA.560@TK2MSFTNGP11.phx.gbl...
> hi guys..
>
> in c# when you want to deal with file path.. I will use "@"
> str_FileName=@"c:\fwefwef\new filename";
>
> in c++? which character should I use?
>
> pls advise,
> Nigil Chua
>
>