why do we use // in c++ ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why do we use // in c++ ?

17th Sep 2017, 6:49 PM
ankita
ankita - avatar
9 Answers
+ 3
thanx. I know it was a silly question but this is my first time learning any computer language so yeah I asked a stupid question. thank u so much for helping though:)
17th Sep 2017, 6:58 PM
ankita
ankita - avatar
+ 3
I'm not sniping at the answer; I see what's accepted. This answer is for a computer history worksheet meaning: "why C++ has // and C does not", otherwise it's social [trivia] ~ how popular convention becomes standards. From source*: "// comments were added for C99 due to their utility and widespread existing practice, especially in dual C and C++ translators." [Early programmers used line editors (EDLIN is still in Win10, 32-bit) where // was more important; you can still find old posts from people who preferred one style over another] *PDF (p58): "Rationale for International Standard—Programming Languages—C Revision 5.10"
17th Sep 2017, 9:55 PM
Kirk Schafer
Kirk Schafer - avatar
+ 2
thank u for answering:)
17th Sep 2017, 7:01 PM
ankita
ankita - avatar
+ 2
still. jinhe language k baare mein knowledge h unhe to ye chota hi lgega.
17th Sep 2017, 7:03 PM
ankita
ankita - avatar
+ 2
thnx. needed encouragement and u gave me exactly that.
17th Sep 2017, 7:12 PM
ankita
ankita - avatar
+ 2
same to u:)
17th Sep 2017, 7:16 PM
ankita
ankita - avatar
0
koi bhi question chota nahi hota😹
17th Sep 2017, 7:02 PM
Surya Jyoti Sinha
Surya Jyoti Sinha - avatar
0
nope...that's why all are answering
17th Sep 2017, 7:05 PM
Surya Jyoti Sinha
Surya Jyoti Sinha - avatar
0
no problem... best wishes :)
17th Sep 2017, 7:15 PM
Surya Jyoti Sinha
Surya Jyoti Sinha - avatar