how can a cout a " ?

This is a discussion on how can a cout a " ? within the C++ Programming forums, part of the General Programming Boards category; i wish to cout blablabhlabh"blah"blahblah, however " is a c++ code-how can i get it to simply cout a " ...

  1. #1
    1.b4 e5 2.a3 d5 3.d4 exd
    Join Date
    Jan 2003
    Posts
    167

    how can a cout a " ?

    i wish to cout blablabhlabh"blah"blahblah, however " is a c++ code-how can i get it to simply cout a " ?

  2. #2
    Evil Sock Puppet MadHatter's Avatar
    Join Date
    Nov 2002
    Posts
    176
    Code:
    //put a backslash in front of it
    cout<<"blahblahblah\"blah\"blahblahblah";
    If I had a world of my own, everything would be nonsense. Nothing would be what it is, because everything would be what it isn't. And contrariwise, what it is, it wouldn't be, and what it wouldn't be, it would. You see?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. class methods to cout stream
    By shintaro in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2008, 07:27 PM
  2. cout vs std::cout
    By none in forum C++ Programming
    Replies: 10
    Last Post: 07-27-2004, 12:20 AM
  3. changing cout output
    By Yohumbus in forum C++ Programming
    Replies: 1
    Last Post: 10-23-2002, 05:09 AM
  4. Redirecting cout stream
    By Arrow Mk84 in forum C++ Programming
    Replies: 1
    Last Post: 10-08-2002, 05:17 PM
  5. printf vs cout
    By RyeDunn in forum C++ Programming
    Replies: 5
    Last Post: 07-09-2002, 05:26 PM

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