I have a problem with file handling. I’m writing code for file handling, that looks like this:
ofstream SaveFile("/home/core-site2.xml")
//SaveFile<<"<?xml version="1.0"?>" ;
SaveFile <<endl ;
SaveFile<<"<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>" ;
When I compile this file I get the following error:
error: expected ‘;’ before ‘text’
What shouuld I do to remove the error?
How do I write these line properly?
The declaration of SaveFile misses a trailing ‘;’. Also, you need to escape the quotes inside the string: