Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These are the only tools were allowed to use, my code use 2 get.() methods to pull the junk 'space' between the important info and

image text in transcribedimage text in transcribedThese are the only tools were allowed to use, my code use 2 get.() methods to pull the junk 'space' between the important info and then actually get the necessary information with the second get.() function. I talked with my teacher and this is his recommended way of doing it with the tools hes introduced to us thus far. I would appreciate help with the error codes and any tips on how i should interpret this program and any pitfalls i might be hitting with the way im using any of these tools. Would greatly appreciate any in-depth advice you can give. thanks.

\#include \#include using namespace std; int main() // get filename and check if it exists string compressedfile; cout "Enter file name: "; cin > compressedfile; ifstream file(compressedfile); if (!file.is_open()) cout "Error: Could not open file" endl; return 0; int num; char useless; char useful; int count; //syntax issues? unsure why it doesnt like my get. () while (file) \{ ifstream > num; ifstream get. (useless); // get. (useless) and get. (useful) in seperate lines?repetition ifstream get.(useful); \} for (count =1; num; count++) \{ cout

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions