Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ code that will read a file and store each piece of the information in a separate vector. After that, display the contents

Write a C++ code that will read a file and store each piece of the information in a separate vector. After that, display the contents of the vectors.

Two vectors required:

Vector A.) Student Full Name

Vector B.) Class Name

file.txt ********************

StudentA, Name1 ENGLISH I (ENG101) <30-st>

StudentB, Name2 SPANISH I (SPN121) (no-prereq) [TXTBOOK REQ]

StudentC, Name3 BIOLOGY GENERAL (BIO220/II) [Ms. McCortney]

StudentD, Name4 CHEMISTRY: ORG (ORCHEM122.2) [A student only] <20-change>

StudentE, Name5 ACCOUNTING (ACC-101) (split with ACC-101A) <8:45> DRAMA (OPT-DRAMA-211*) (classrooom R220)

StudentF, Name6 PE (SOCCER122) {John T.} [Him/His]

*********************

Student name start at the first character of the first line.

Students are separated from their class schedules by at least one tab.

The class name includes: Name and Class code in parenthesis. For example: DRAMA (OPT-DRAMA-211*)

If a student has multiple classes in their schedule, (except for the first line), all other lines will start with at least one tab.

Example:

StudentE, Name5 ACCOUNTING (ACC-101) (split with ACC-101A) <8:45> (tab here) DRAMA (OPT-DRAMA-211*) (classrooom R220)

Additional information stored in brackets or other parenthesis should be ignored.

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

More Books

Students also viewed these Databases questions

Question

=+Where does the focus of labor relations lie? Is it collective

Answered: 1 week ago