From: cdamond AT uclink2 DOT berkeley DOT edu Newsgroups: comp.os.msdos.djgpp Subject: Re: what about the "\" Date: 14 Dec 1996 07:21:57 GMT Organization: University of California, Berkeley Lines: 40 Message-ID: <58tkil$9aa@agate.berkeley.edu> NNTP-Posting-Host: beshaba.hip.berkeley.edu Originator: lucifer AT agate DOT berkeley DOT edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > >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? > This is really a newbie C question, not djgpp question, but the answer is: strcpy(str, "C:\\PT");