Question: Hello, I have a problem regarding a c++ program I am writing for class. I have a text file that looks like this: Infectious:1 Recovered:2

Hello, I have a problem regarding a c++ program I am writing for class. I have a text file that looks like this: Infectious:1 Recovered:2 Display:2 s,s,s,s,s,s,s,s,s,s s,s,s,s,s,s,s,s,s,s s,s,s,s,s,s,s,s,s,s s,s,s,s,s,s,s,s,s,s s,s,s,s,i,i,s,s,s,s s,s,s,s,i,i,s,s,s,s s,s,s,s,s,s,s,s,s,s s,s,s,s,s,s,s,s,s,s s,s,s,s,s,s,s,s,s,s s,s,s,s,s,s,s,s,s,s I need to get the integers from the first 3 lines and store the on separate ints, and then need to store the list after that into a vector. I am confused on how I should store the data line by line, while ignoring everything but the number.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!