logo CodeStepByStep logo

streamBug

Language/Type: C++ basics streams file input
Related Links:

The following code attempts to read and print the contents of a file. But it contains a bug. Fix the code so that it reads and prints the file contents properly. Do not use a break or return statement in your solution.

Bare code. Write a fragment of C++ code as described, without any main function or heading around your code.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.