string c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

string c++

Somewhere I have found an exercise where I write a code whose result is correct on my compiler but compiler on this site report error. Error is said to be missing the last quotation mark on string ("). I don't know how to fix it. Any idea? https://code.sololearn.com/cU0TOBwej8ae/?ref=app

19th Jul 2021, 5:56 PM
TeaserCode
4 Answers
+ 1
TeaserCode code is working fine I belive you are getting surprised that why double quotes are not getting printed... If so, please find below details: String variable is assigned a value within double quote. For example, String s = "test"; means test is value of variable s rather than "test or "test" If you want double quote as value within the string , you can use \" for that Try below in your code example for variable a in line 19 and see output "\"the_sum_is_shining\""
21st Jul 2021, 7:09 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
Post your code that showing error . That may helps to find problem.. otherwise no idea !!!! edit: tq for edit
19th Jul 2021, 6:07 PM
Jayakrishna 🇮🇳
+ 1
Your linked code is working without any error.
19th Jul 2021, 6:58 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
It is said for result: expected: "theSunIsShining" actually: "theSunIsShining
19th Jul 2021, 7:05 PM
TeaserCode