[英]using while(! infile.eof()) Curious how to break it before eof() in C++
I am going through a file looking for specific words 我正在通过文件查找特定单词
Char[50]=getline(file,/n)
using getline to store each line into an char array to compare to the string(s) I am looking for 使用getline将每一行存储到char数组中以与我要查找的字符串进行比较
If( “<”x “>”==char[50]) || (“<” y “<”==char[50])||(“<”z“>”==char[50])
Break;
Will using break
, break me out of the loop early? 使用
break
我早日摆脱循环吗?
Yes, but the b needs to be lowercase. 是的,但是b必须为小写。
break;
Will get you out. 会带你出去。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.