Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

So I'm trying to read the txt file. So my thought is that I read the file until the program reads a semicolon. I want

So I'm trying to read the txt file. So my thought is that I read the file until the program reads a semicolon. I want to grab the word after the semicolon and store it then display the result which is happy, then read next line then display sadness etc.

I'm stuck on the while loops. Code is in c++

image text in transcribed

#includesiostreamP #includeststrealP #includestring #include using nanespace std; full slept energetic happy hungry sleepy sadness hot sunny humid sweaty stinky cold // struct type rule is declared struct rule vector> results;//IF I READ THE SEMICOLON I STORE THE RESULT AFTER THE SEMICOLON //* the driver to read and display rules int main) rule myRules [101 int nunRules; how many rules were stored in Rules readRules (myRules, numRules); / both arguments will be set in the function // displayRules (xxxxxxx, results)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

1. How can evolutionary theory explain prosocial behaviour?

Answered: 1 week ago