20. Reading from a File

Reading from a File

Great! Now that you have some practice with if and while statements, you are ready to read data from a file into your C++ program. In the following notebook and the next exercise, you are going to write code to read a file, line by line. Have a look below for step-by-step instructions on how to do this.


This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a