From the course: Code Clinic: C++

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Import data

Import data - C++ Tutorial

From the course: Code Clinic: C++

Start my 1-month free trial

Import data

- [Narrator] Whenever I develop a new application that requires importing data from another source, the first thing I do is determine how it's formatted. A spreadsheet program like Excel makes it easy to open and view the contents of files that are formatted as delimited text such as CSV files. But it doesn't give you the full picture of how the data is formatted. Excel will hide the delimiters or end of line characters that can trip up a C++ application. Instead, I prefer to view it in a text editor like Visual Studio Code where I can see these details exposed. In the navigation pane on the left, I can see the data files for this challenge in the resources folder split across four different TXT files, each corresponding to a different year. I'll open the Environment_Data_Deep_Moor_2012.txt file and then go to the View menu and select Toggle Render Whitespace to see all the Whitespace characters that are typically…

Contents