What just happened?

We provided two standalone functions that define redirection operators for the Player class to and from a QDataStream instance. This lets your class be serialized and deserialized using mechanisms offered and used by Qt.

Get Game Programming using Qt 5 Beginner's Guide - Second Edition 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.