Thread: Compiler tells me I am using escape sequences when I use Fputs

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    35

    Compiler tells me I am using escape sequences when I use Fputs

    I am trying to print this to a file using fputs
    Code:
    fputs("{\rtf1\ansi\deff0 {\fonttbl {\f0 Courier;}}",  myFile);
    I think it has a problem with "\d". Is there a way for it to just print verbatim what I want and not see any escape or control characters?

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Code:
    fputs("{\\rtf1\\ansi\\deff0 {\\fonttbl {\\f0 Courier;}}",  myFile);
    Escape each "\" with an "\"

    Tim S.

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    35
    It worked
    Last edited by Linux Trojan; 07-03-2011 at 08:28 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Escape sequences in c
    By linuxlover in forum C Programming
    Replies: 3
    Last Post: 11-03-2010, 02:39 PM
  2. Problems with escape sequences
    By stdq in forum C Programming
    Replies: 1
    Last Post: 10-10-2010, 07:13 PM
  3. C Escape sequences
    By Tool in forum C Programming
    Replies: 10
    Last Post: 11-20-2009, 09:38 PM
  4. Escape sequences in VC++
    By emilyh in forum Windows Programming
    Replies: 7
    Last Post: 09-26-2001, 07:02 AM
  5. Escape Sequences
    By Me-Again-Again in forum C Programming
    Replies: 3
    Last Post: 09-05-2001, 06:24 AM