Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <istream>
#include <string>
#include <fstream>
using namespace std;
void scan(istream& f, const char* hpat)
{
string line;
while (getline(f,line))
{
while (line.find(hpat) == string::npos
&& getline(f,line))
;
while (getline(f,line) && line[0] != '#')
cout << line << endl;
}
}
int main(int argc, char* argv[])
{
ifstream f("test.txt");
scan(f,"!");
return 0;
}