Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
need to make a string matching program that takes input from a text file and outputs that match (if there is one) asked from the user. i have done this part , the only problem is that , with the output match , i also need to print some words before and after the actual match , like you would search in google and it gives you the results , with extra details .... how could i do that sort of searching?
here is my program ..
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
ifstream myfile ("text.txt");
string line;
int offset;
string tosearch;
cout<< "Enter the word to be searched from the text file" << endl;
cin>> tosearch;
while (!myfile.eof())
getline(myfile,line);
if (offset = line.find(tosearch, 0) != string::npos)
cout << "The word has been found"<< endl;
}
cin.get();
return 0;
This code should include a while loop that allows the user to continue entering employees as long as they want to continue:int main(){Real payrate,hours, gross,again;
For each of problems write C++ code to do the required task. Receive the number and find out whether it is odd or even.
Use functional decomposition to solve this problem, and code the solution using functions wherever it makes sense to do so. Your program should check for invalid data such as nonpositive dimensions, number of rooms less than 1.
Write a program that will be used to gather statistical data about the number of movies
Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.
Write a program to calculate a person's net pay after subtracting federal income tax.The program should ask the user to enter the person's name, social security number, gross pay, and the number of dependents.
The knight's tour problem is as follows: given an initial position for a single knight on an otherwise empty chessboard, find a sequence of 64 moves that will make the knight visit every square on the board exactly once
Implement a simple file system with login authentication and access control - Construct a hash/salt/shadow based user/password creation system.
Write C++ Program:Implement a standard SORTED linked list class. Be sure to include constructor/copy constructor, destructor, and assignment operator overload.
Given a Binary Tree, print Right view of it. Right view of a Binary Tree is set of nodes visible when tree is visited from Right side.
Starting Out with C++ Write a program that asks the user to enter two numbers.
The CD object should have a data member that is a linked list of your song structure that you have in CD. The CD class needs a function that allows it to add a song to the object, that function would then append the song to that instance of the link..
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd