I am converting a bash script to a C++ code and to develop it further with C++
I am also not so experienced in C++.
My question is I have a HTML file with variables represented with "$" sign for BASH variable.
Part of the HTML code is here that works with BASH script.
The variable "status" is represented with "$status"
<span style="font-size:12px;"><strong><span style="font-family:times new roman,times,serif;">Status : $status</span></strong></span></div>
Now I have many lines like this. If I use C++ "ofstream" to define a file & I have to use operator "<<" to add these lines to html file after replacing variables with "<<status<<" and also escape all double quotes with \.
Is there a better way to replace variables in a HTML file?
I find it is easy with BASH as it uses "$" but in C++, we have to add "<<" at the beginning & end of each variable & also escape all double quotes.