From the course: C++ Essential Training

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Challenge: Transform a file (STL)

Challenge: Transform a file (STL) - C++ Tutorial

From the course: C++ Essential Training

Challenge: Transform a file (STL)

(upbeat music) - [Instructor] For this challenge, you will read a text file, decode it, store its data in a structure, and print the results using the standard template library. The text file represents items in an inventory. Each line looks like this. Notice the tab characters. Each line in the file has two tabs separating its three fields. The first field is the SKU number. That's S-K-U for stock keeping unit, here just one, two, three, and four. The second field is the name of the item. And the third field is the description. The file is named items.text and you'll find it in chapter nine of the exercise files. The output of your challenge will look something like this. This challenge will use a lot of your knowledge from this course so far, including loops, operators, and the STL with file IO. Expect this one to take a little longer than some of the others, perhaps an hour or longer. Feel free to take your time…

Contents