Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the C + + library regex to implement the following application: Your program should read input string from a text file ( input .

Use the C++ library regex to implement the following application:
Your program should read input string from a text file (input.txt) that contains 100 lines. When the program is executed, it should print the following statistics about these keywords Error,error,Errors,errors, or eror:
1. User enters a line number and the program prints the number of keywords in that line.
2. The number of lines containing at least one of the keywords.
3. The line number(s) containing the maximum number of keywords.
4. The line number(s) for the lines starting with these keywords
Note: the numbering of the lines starts with 0.
Download the source code prog-ex-toc.cpp and run it to see how it should work. Then, read the comments to see where to put your code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions