this is probably a dumb question but ...

This is a discussion on this is probably a dumb question but ... within the C++ Programming forums, part of the General Programming Boards category; How can i cout<< " \ "<<endl; i get errors when i cout " \ " no errors on anything ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    16

    this is probably a dumb question but ...

    How can i
    cout<< " \ "<<endl;

    i get errors when i cout " \ " no errors on anything else... just when i cout that particular slash... if anyone an help me out it would be appreciated

  2. #2
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    You need "\\".

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    16
    Thank you... now that i think about that.. it makes sense

  4. #4
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    Please, all newbies.
    Instead of making subjects like "Im so stupid help me with this extremely dumb question" just do it like "Help me with x function" or something instead. Im tired of seeing all these "Dumb question" posts.
    No question is dumb!

  5. #5
    Registered User toaster's Avatar
    Join Date
    Apr 2002
    Posts
    161
    yep, anyway, you can also do this:

    cout<<char(#)<<endl; // whereas # is the ASCII value (an integer) of the character.
    think only with code.
    write only with source.

  6. #6
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    isn't it:
    cout << (char)# << endl;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. dumb question
    By travis999 in forum C Programming
    Replies: 3
    Last Post: 10-26-2007, 01:57 AM
  2. very dumb question.
    By Blips in forum C++ Programming
    Replies: 14
    Last Post: 11-08-2005, 09:37 AM
  3. Dumb question
    By dragon2309 in forum C Programming
    Replies: 18
    Last Post: 10-29-2005, 04:27 PM
  4. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  5. another dumb question - loop not working?
    By Captain Penguin in forum C++ Programming
    Replies: 8
    Last Post: 10-06-2002, 11:15 PM

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