在c ++中使用文件io制作简历 [英] making curriculum vitae using file io in c++
问题描述
我想在c ++文件IO中创建一个课程vitae.html。当我使用c ++中的文件IO读取此文件时,它显示了我想要的格式,但是当我在谷歌中打开这个课程vitae.html时chrome然后删除所有空格,行显示为段落。我该怎么办。我已经用这段代码保存了它
outf<<地址<<\t<<<<< endl;
outf<<目标<<\t<< yyy<< endl;
当我在浏览器中打开它时它给了
地址地球目标!! 。
但我想要它
地址地球
目标!!
我该怎么办?
浏览器解释html文档。纯文本是它的子形式(因此可以阅读)但是关于空格和行尾的规则是不同的。
你的真实文件看起来(如果从文本编辑器中删除)至少像
< html >
< 正文 >
地址earth < br / >
目标!
< / body >
< / html >
这是您的程序必须在文件中写入的内容,以便您可以通过浏览器的方式阅读。
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 ?
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> <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.
这篇关于在c ++中使用文件io制作简历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!