Skip to content

About

A lightweight, dependency-free QR Code generator built entirely from scratch in modern C++17.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR Code Generator (C++)

Overview

This project is a QR Code Generator written in C++17.
It allows you to encode text or URLs into QR codes with customizable error correction levels and renders them directly in the terminal using ANSI escape sequences.


Features

  • Generate QR codes from any string input.
  • Supports four error correction levels:
    • Low (7% recovery)
    • Medium (15% recovery)
    • Quartile (25% recovery)
    • High (30% recovery)
  • Terminal rendering using colored blocks (ANSI escape codes).
  • Modular design with QR_Generator class for easy integration.

Requirements

  • C++17 or later
  • CMake ≥ 3.10
  • A terminal that supports ANSI escape sequences (Linux/macOS, or Windows with proper terminal emulator)

Project Structure

QR-Generator/
│─ src/
│ ├── main.cpp
│ └── QR_Generator.cpp
│─ include/
│ ├── QR_Generator.hpp
│ └── includes.hpp
│─ screenshots/
│ └── terminal.png
│─ CMakeLists.txt
│─ README.md
│─ .gitignore
└─ LICENSE


Build Instructions

1. Clone the repository

git clone https://github.com/7IRE/QR-Generator.git
cd QR-Generator

2. Configure with CMake

cmake -B build

3. Build

cmake --build build

4. Run

./build/qrcode_app

QR Code Generator (C++)

Usage

When you run the program:

  • You’ll be prompted to select an error correction level (0–3).
  • Enter the text or URL you want to encode.
  • The QR code will be rendered in your terminal.

Terminal Output

QR Example


Configuration

  • Extend render() to support different rendering styles (ASCII, Unicode blocks, images).
  • You can easily integrate this library into any other C++ project by copying the core files and linking them via CMake.

About

A lightweight, dependency-free QR Code generator built entirely from scratch in modern C++17.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages