Thread: outputing quotes(') and double quotes(")

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    1

    outputing quotes(') and double quotes(")

    I am writing a console 32 app in MS Visual C, to convert a text file to a series of Active Server Pages Files, and need to be able to sent (') and (") from C to my output file

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    precede the ' and " with \, like you would when outputting a newline

  3. #3
    Registered User Sekti's Avatar
    Join Date
    Feb 2002
    Posts
    163

    heres some code

    #include <iostream.h>

    int main()
    {
    cout<<"And the dog said, \"Hello I\'m Going Home\"."<<endl;
    return 0;
    }

    should output And the dog said, "Hello I'm Going Home".
    +++
    ++
    + Sekti
    ++
    +++

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Searching a text file for double quotation marks "
    By willie in forum C Programming
    Replies: 4
    Last Post: 11-23-2008, 02:00 PM
  2. single vs double quotes
    By innuendo in forum C++ Programming
    Replies: 17
    Last Post: 11-03-2008, 05:38 PM
  3. Stripping quotes from a string
    By -W0kk3L- in forum C Programming
    Replies: 3
    Last Post: 03-15-2006, 01:03 PM
  4. writing double quote & comma delimited files
    By emt in forum C++ Programming
    Replies: 5
    Last Post: 06-30-2003, 12:28 AM
  5. double quotes or carrots?
    By CSoFun in forum C++ Programming
    Replies: 4
    Last Post: 01-31-2003, 05:05 PM