All Projects Beginner Coming Soon

Unit Converter

Write a flexible unit converter from scratch in modern C++ with zero external dependencies. You offer categories such as length, weight, and temperature, apply the right conversion formula, and print a neatly formatted result. A tidy project for practising functions, enums, and numeric formatting.

~1.3 hours

Support Free C++ Education

Help us keep this platform free for everyone! Your support enables us to create more high-quality lessons, exercises, and interactive content.

Become a Patron

What You'll Build

A menu-driven console converter that turns miles into kilometres, pounds into kilograms, Celsius into Fahrenheit, and more, printing results to a chosen number of decimal places.

Learning Objectives

  • Model conversion categories with an enum class
  • Encapsulate each conversion formula in its own function
  • Work with double arithmetic for accurate scaling and offsets
  • Format output precision with std::fixed and std::setprecision from <iomanip>
  • Drive category and unit selection with a menu and switch statements
  • Validate numeric input and reprompt on invalid entries

Coming Soon

This project is in development. Register your interest and we'll email you the moment it goes live.

No spam. Unsubscribe anytime.

Coming Soon

This project is in development. Register your interest and we'll email you the moment it goes live.

No spam. Unsubscribe anytime.