Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 10
How to add single quotes or double quotes in a program? (solved)
Please check out the code below and help me to resolve my required output . Thanks in advance. https://code.sololearn.com/c5M0k5NCc0oO/?ref=app
4 Respostas
+ 4
You need to use an escape sequence to insert single or double quotes into a string, i.e. a '\' followed by the character you want to insert. For example, this is what your showdist() method could look like:
void showdist()
{
cout << feet << "\' - " << inches << '\"';
}
Escape Sequences:
https://en.cppreference.com/w/cpp/language/escape
+ 8
Thank you Shadow and Mohammed Qadir khan for solving my doubts. I was really confused how to implement it in the program. Now I understood this very clearly. Thank you so much to both of you.
+ 2
+ 1
Aysha [Left] Welcome š.