www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/29/16:52:58

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Backslash codes
Date: Sun, 29 Sep 1996 12:56:20 -0700
Organization: Alcyone Systems
Lines: 14
Message-ID: <324ED464.58657B8@alcyone.com>
References: <19960929 DOT 100149 DOT 9774 DOT 3 DOT wilbur3 AT juno DOT com>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Will C Stockwell wrote:

> I am having a problem with the backslashes codes for the printf()
> statement and the compiler. I put one in and it say stray "\" in code or
> something close to that. What's the deal with this? Thanks.

Backslashes are used as escape codes in string literals in C; I suggest you
get an introductory book on C.  If you want to actually embed a backslash in a
string, you need to escape it twice (\\).

-- 
Erik Max Francis, &tSftDotIotE   http://www.alcyone.com/max/   max AT alcyone DOT com
San Jose, California   ICBM 37 20 07 N 121 53 38 W   R^4: the 4th R is respect
"Gods are born and die, but the atom endures."              -- Alexander Chase

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019