outputing quotes(') and double quotes(")

This is a discussion on outputing quotes(') and double quotes(") within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I am writing a console 32 app in MS Visual C, to convert a text file to a series of ...

  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,825
    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, 01:00 PM
  2. single vs double quotes
    By innuendo in forum C++ Programming
    Replies: 17
    Last Post: 11-03-2008, 04:38 PM
  3. Stripping quotes from a string
    By -W0kk3L- in forum C Programming
    Replies: 3
    Last Post: 03-15-2006, 12: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, 04:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21