Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want to make a curriculum vitae.html in c++ file IO .I have made it when i read this file using file IO in c++ it shows the formatting which i want but when i open this curriculum vitae.html in the Google chrome then it removes all the spaces and the lines are shown as paragraphs .What should i do .I have saved it by this code




outf<<"Address"<<"\t"<<add<<endl;
outf <<"Objective"<<"\t"<<yyy<<endl;


When i open it in browser it gives

Address earth Objective !! .
But i want it as
Address earth
Objective !!

what should i do ?
Posted

1 solution

A browser interprets html documents. A plain text is a sub-form of it (so it can be read) but the rules about spaces and end-of line are different.

your real file shold look (if viwed from a text editor) at a minimum like

HTML
<html>
<body>
Address earth <br/>
Objective !!
</body>
</html>


This is what your program must write in the file to be readable the way you wanted by a browser.
 
Share this answer
 
v2
Comments
laiza ramal 17-Aug-13 9:39am    
But how can i do this in c++

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900