Mail Archives: djgpp/1996/12/12/21:43:31
Ole Winther wrote:
>
> Well some small problems
>
> I where trying this.
>
> char* str;
> str = new char[5];
> strcpy( str, "C:\PT" );
>
> and printing this gives ( C:PT ), the "\" is stripped. when compiling the
> programs there complains about and unknown escape char. How to do it?
>
> Ole Winther
Should this not be :
strcpy( str, "C:\\PT"
since the single \ is read as \p (Escape p)
--
Bill C 15 years of dBASE, One month of C, 42 years of life.....
"In pursuit of Knowledge"
100610 DOT 3526 AT Compuserve DOT com wjcampbe AT bechtel DOT com
Opinions expressed are personal and are not Bechtel opinion or policy.
- Raw text -