From the course: Parallel and Concurrent Programming with C++ Part 2

Unlock the full course today

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

Challenge: Download images

Challenge: Download images - C++ Tutorial

From the course: Parallel and Concurrent Programming with C++ Part 2

Start my 1-month free trial

Challenge: Download images

(upbeat music) - [Teacher] For our third and final challenge problem, your goal will be to design and build a program to concurrently download a sequence of image files from the internet and return their total number of bytes. We've hosted 50 images at the URL shown here, which we'll use as the target files to download for this challenge. It's a series of JPEG files, and they're numbered sequentially from one to 50. As a starting framework for this challenge, we've implemented a sequential version of an image downloader function at line 13, which has a single input parameter for the number of images to download. It simply uses a four loop to repeatedly call the download image helper function on line 16, passing it a different value each time from one to the number of images to download. That download image function will download the corresponding image files from the Internet, and then return its file size and…

Contents