Integers, signs, and overflow

F-INT-V4-2medium

Keep the checksum to 32 bits

A save editor for a retro game stores each stage’s coin count in one byte.

What needs to change

Repair checksum so every slot prints the 32-bit checksum its save format defines.

Reproduce

  1. Compile and run the eight-stage sample with g++, then compare its coins and checksum line with the expected stdout.

Acceptance criteria

Your review marks · Saved in this browser. Test acceptance is tracked separately.

Notes

The file contains its headers, readSlots, runningTotals and main. The browser compiles with g++ -std=c++23.

Input: one save slot per line; each count is one byte of the save.

Sign in to open this exercise

The ticket brief is public. Sign in to access the exercise. Paid exercises require Pro.

Sign in