C++ projects for beginners: 12 realistic projects with tests
Beginner C++ project ideas that feel like real work: parsing, validation, classes, maps and money done right. Each with tickets, tests and a code review checklist.
The best beginner C++ projects are small, have a clear definition of done, and teach one or two ideas at a time. Calculators and "guess the number" games are a start, but they don't look much like the work you'll do on a team. Below are twelve projects that do: each one is a simulated job at a fictional company, with tickets, tests and a review checklist.
All of them are part of Devventura's Base Camp level, ordered roughly from easiest to hardest.
What you'll practise
- Reading and validating text safely: splitting lines, trimming, rejecting what doesn't fit.
- Choosing the right type:
intfor counts, integer cents for money,std::optionalfor "maybe no value". - Classes with rules (invariants) that can never be broken, like a stock count that never goes negative.
- Standard containers:
std::vector,std::map,std::unordered_map. - Testing: running the provided tests and reading what a failure tells you.
New to the toolchain? Start with setting up C++ with CMake and unit testing in C++.
The projects
Hopwire
Link shortener for Hopwire
Build the core of Hopwire's link shortener: turn long campaign URLs into short codes and back again, then give the support team a console to use it.
- hash maps
- number bases
- input validation
- streams
- unit tests
Frostline Cold Storage
Sensor readings summary for Frostline
Turn the raw export of Frostline's freezer sensors into a summary per freezer, and flag readings outside the safe range.
- parsing text
- structs
- std::map
- floating point
Brightpath Academy
A gradebook for Brightpath Academy
Give Brightpath's teachers letter grades, averages and a class ranking, instead of a spreadsheet full of formulas.
- conditionals
- classes
- std::map
- sorting
Chronicle Clocks
Roman numerals for Chronicle Clocks
Convert years and numbers to Roman numerals for Chronicle's engraving machines, and check the numerals customers type in.
- lookup tables
- greedy algorithms
- string building
- validation
Pantry & Co.
Stock counts for Pantry & Co.
Track stock as goods arrive and leave Pantry's warehouse, and tell the buyers what to reorder.
- classes
- invariants
- std::map
- input validation
Ledgerly
Invoice totals for Ledgerly
Read amounts, compute net, VAT and gross totals to the cent, and never lose a cent to floating point.
- integer arithmetic
- rounding
- parsing
- exceptions
Inkwell Publishing
Manuscript statistics for Inkwell
Split manuscripts into words and find the most used ones, so Inkwell's editors can spot overused words at a glance.
- string processing
- character classes
- hash maps
- sorting with tie-breaks
Lockstep
Password rules for Lockstep
Check new passwords against Lockstep's policy and a list of leaked passwords, and tell users every problem at once.
- character classes
- UTF-8 basics
- hash sets
- normalisation
Tasklane
The task list behind Tasklane
Build the core of Tasklane's to-do list: strict due dates, stable task IDs and an agenda in the right order.
- date validation
- enums
- stable IDs
- multi-key sorting
ParkPoint
Parking fees for ParkPoint
Compute what ParkPoint's pay machines charge: stays across midnight, a free grace period, a daily cap and an evening flat rate.
- time arithmetic
- integer rounding
- business rules
- boundary testing
Market Square
Weekly sales report for Market Square
Parse Market Square's sales export, quotes and all, and turn it into revenue per category without letting one bad row spoil the report.
- state machines
- CSV quoting
- error reporting
- aggregation
Coinbridge Credit Union
Account ledger for Coinbridge
Build the ledger behind Coinbridge's accounts: deposits, withdrawals, all-or-nothing transfers, reversals and statements with running balances.
- invariants
- atomic operations
- audit trails
- result codes
A few that stand out
Link shortener for Hopwire is the classic first project: generate short codes, store links in a map, handle duplicates. It's free to try for 7 days.
Invoice totals for Ledgerly teaches a lesson every developer
needs once: never store money in a double. You'll compute VAT in integer cents and round exactly
once per rate.
Account ledger for Coinbridge is the hardest of the twelve: transfers that happen completely or not at all, and reversals that never rewrite history.
How to get the most out of a beginner project
- Read the ticket twice and write down every question it doesn't answer.
- Write the edge cases before the code: empty input, the boundaries, what must be rejected.
- Run the tests often. A red test is information, not a failure.
- Compare your design with the reference design after you've written your own.
- Do the stretch ticket. It's where you write your own tests for the first time.
When these feel comfortable, move on to intermediate C++ projects.
Questions and answers
- What should my first C++ project be?
- Something with clear input and output and no user interface: reading and validating text, a small calculation, or a class that keeps a rule (like a balance that never goes negative). It teaches the language without fighting a GUI framework.
- Which C++ version should beginners learn?
- Modern C++: C++17 or C++20. Use std::string, std::vector, std::optional and std::map from the start, and leave raw pointers and manual memory management for later.
- Do I need an IDE to build C++ projects?
- No. A compiler (GCC, Clang or Visual Studio's MSVC), CMake and any editor are enough. CMake works the same on Windows, macOS and Linux.
Practise it in a project
These projects put this guide to work, with tickets, tests and code review.
Hopwire
Link shortener for Hopwire
Build the core of Hopwire's link shortener: turn long campaign URLs into short codes and back again, then give the support team a console to use it.
- hash maps
- number bases
- input validation
- streams
- unit tests
Frostline Cold Storage
Sensor readings summary for Frostline
Turn the raw export of Frostline's freezer sensors into a summary per freezer, and flag readings outside the safe range.
- parsing text
- structs
- std::map
- floating point
Brightpath Academy
A gradebook for Brightpath Academy
Give Brightpath's teachers letter grades, averages and a class ranking, instead of a spreadsheet full of formulas.
- conditionals
- classes
- std::map
- sorting
Ledgerly
Invoice totals for Ledgerly
Read amounts, compute net, VAT and gross totals to the cent, and never lose a cent to floating point.
- integer arithmetic
- rounding
- parsing
- exceptions