It grabs the specified range of lines from the buffer with a getline and iterates through each.
它通过getline从缓冲区获取代码的指定范围,并对各项进行迭代。
www.ibm.com
The function also needs to know the text on the current line, which can be retrieved using getline , and is stored in curr_line.
该函数还需要知道当前行上的文本,可以使用getline来获取存储在curr_line中的当前行。
www.ibm.com
The function then grabs every line in the current file (getline(1,‘$’)) and calls the built-in writefile() function to write them to disk.
函数随后获取当前文件(getline(1,‘$’))中的每一行并调用内置的 writefile() 函数来将它们写入到磁盘中。
www.ibm.com
getline
istream& getline ( istream &is , string &str , char delim ); istream& getline ( istream& , string& ); is 进行读入操作的输入流 str 存储读入的内容 delim 终结符
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧
评论 抢沙发