ing Maps or

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question

Using Maps or Sets

 

Write a C++ program that:
Creates a function checkWord that:
a. uses an input file stream to read input file (file1) containing correct words from the
English dictionary into a proper STL container.
b. uses an input file stream to read another input file (file2) containing untrusted English
c. words that we need to check its correctness against the trusted file from the dictionary.
d. Prints the incorrect words in file2 after checking it against file1.
e. If there are no incorrect words, the function should print "All words are correct"
Expected Output:
1. When reading from UnTrustedVocabs1:
Academys
Aceldamad
acentricl
2. When reading from UnTrustedVocabs2:
All words are correct
Transcribed Image Text:Write a C++ program that: Creates a function checkWord that: a. uses an input file stream to read input file (file1) containing correct words from the English dictionary into a proper STL container. b. uses an input file stream to read another input file (file2) containing untrusted English c. words that we need to check its correctness against the trusted file from the dictionary. d. Prints the incorrect words in file2 after checking it against file1. e. If there are no incorrect words, the function should print "All words are correct" Expected Output: 1. When reading from UnTrustedVocabs1: Academys Aceldamad acentricl 2. When reading from UnTrustedVocabs2: All words are correct
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Representation of Polynomial
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr