I want to put this
<script src = "Script2.js" type = "text/javascript"> < / script>"
in a C++ string so I apped a (\) symbol before every double quotes (") to give it a literal meaning of ", instead of a string demarcation in C++.
like this:
std::string jsFilesImport = "<script src = \"Script2.js\" type = \"text/javascript\"> < / script>\""
If i have a big string with many ("- double quotes) adding (\) for every (") becomes difficult. Is there a simple way in C++ to achieve this ?
Aucun commentaire:
Enregistrer un commentaire