读取文本文件 [英] read a text file
本文介绍了读取文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
读取一个文本文件,然后提取它的单词,然后将它们存储在另一个文本文件中,每个单词在单独的行中.
That read a text file and then extract it''s words and store them in another text file each words in a separates line.
推荐答案
看看在 istream [
Take a look at istream[^], ostream and string. It should not take too long to work it out.
好吧,任务很简单:
- 读取输入文件.
- 匹配每个单词(用于分隔符",例如空格,制表符等).
- 写每个单词加一个换行到输出文件.
Well, the task is fairly simple:
- Read the input file.
- Match every word (seach for ''separators'', i.e. spaces,tabs, etc).
- Write every word plus a newline to the output file.
您已经使用标签 C#而不是 C ++ 发布了完全相同的问题(请参见帮助请在读取的文本文件中 [ ^ ] ):我认为您必须问自己想做什么
You have already posted exactly the same question just with the tag C# instead than C++ (see Help Please in the read text file[^]): I think you have to ask yourself what do you want to do
这篇关于读取文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文