The picket fence had stood for years without any issue. That's all it was. A simple, white, picket fence. Why it had all of a sudden become a lightning rod within the community was still unbelievable to most. Yet a community that had once lived in harmony was now divided in bitter hatred and it had everything to do with the white picket fence. She had a terrible habit o comparing her life to others. She realized that their life experiences were completely different than her own and that she saw only what they wanted her to see, but that didn't matter. She still compared herself and yearned for what she thought they had and she didn't.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

C++
Smiley.txt:

The picket fence had stood for years without any issue. That's all it was. A simple, white, picket fence. Why it had all of a sudden become a lightning rod within the community was still unbelievable to most. Yet a community that had once lived in harmony was now divided in bitter hatred and it had everything to do with the white picket fence.

She had a terrible habit o comparing her life to others. She realized that their life experiences were completely different than her own and that she saw only what they wanted her to see, but that didn't matter. She still compared herself and yearned for what she thought they had and she didn't.

 

Write a program that does the following steps:
Reads all the words in the "Smiley.txt" file and stores them in
map<string, int) Roman where the string refers to the Word and
int refers to the Word size. The WordSize needs to be calculated as
you fill the map.
You might want to use getline(myfile, myWord, ' ', where myfile is
the handler to the file, myWord is destination string where words
are stored, " is a delimiter.
Prints all the elements (string & size) of Roman
Finds the longest word in Novel and stores it in int Wrd Longest
Creates a vector<int> Histogram(Wrd Longest, 0) that contains the
total number of words of size 1,2,3,4,....Wrd Longest
Print the Histogram vector
Print all the words in Novel that are longer than 10 letters
Transcribed Image Text:Write a program that does the following steps: Reads all the words in the "Smiley.txt" file and stores them in map<string, int) Roman where the string refers to the Word and int refers to the Word size. The WordSize needs to be calculated as you fill the map. You might want to use getline(myfile, myWord, ' ', where myfile is the handler to the file, myWord is destination string where words are stored, " is a delimiter. Prints all the elements (string & size) of Roman Finds the longest word in Novel and stores it in int Wrd Longest Creates a vector<int> Histogram(Wrd Longest, 0) that contains the total number of words of size 1,2,3,4,....Wrd Longest Print the Histogram vector Print all the words in Novel that are longer than 10 letters
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Robotics
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education