Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
c++ cout
#1
in c++ how would you write a program that when run writes " this (") is a quote, and this (\) is a backslash."
url=http://www.random-seed.net][Image: asylumsig.png][/url]
Reply
#2
\" and \\. the \ is a so called escape character within strings
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#3
Just for future reference, the "\" character isn't an escape character for just C++, but many modern programming languages. JavaScript makes use of it as well.
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)
Reply
#4
so does freebasic, if you use option escape. :wink:
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#5
Quote:so does freebasic, if you use option escape. :wink:

:evil: Do what? You mean I been using CHR$(34) + " <- This is a quote" all this time? when all I needed:

Code:
option escape

PRINT "\" <- This is a quote"

:rotfl:
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#6
Yup.


=p pretty amazing isn't it.
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#7
Cry Its stuff like this that makes you feel like a n00b again....

:rotfl: j/k
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#8
You can also do
Code:
PRINT """ <- This is a quote"
with or without Option Escape.
Reply
#9
:lol: That's clever.... I like that one better...
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)