86. Inserting movies into an SQLite database

The solution to this problem builds upon the previous one. You must solve that one before continuing here. Also, the function split() that is used in the code here is the same from problem 27, Splitting a string into tokens with a list of possible delimiters, from Chapter 3, Strings and Regular Expressions. For this reason, it will not be listed here again. In the source code for this book, you will find a database file called cppchallenger86.db that is prepared with several records for this problem.

The following function, read_movie(), reads information about a movie from the console (title, release year, length in minutes, directors, writers, and cast), creates a movie object, and returns it. ...

Get The Modern C++ Challenge now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.