Skip to content

jessysutherns/file-editor-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💻 File Editor (C++)

📌 Overview

This project presents the design and implementation of a command-line file editor written in C++.

The application allows users to open, view, edit, and save files in multiple formats, including hexadecimal, binary, and character representations.

👉 This project demonstrates low-level data manipulation and systems programming using modern C++.


⚡ Quick Demo

  1. Open file → enter 1
  2. Enter filename (e.g. test.txt)
  3. Display hex → enter 2
  4. Display characters → enter 4
  5. Exit → enter 10

⚙️ Features

  • 📂 Open and read binary files

  • 🔍 Display file content in:

    • Hexadecimal format
    • Binary format
    • Character format
  • ✏️ Edit file data:

    • Modify bytes in hex
    • Modify bits in binary
    • Modify characters directly
  • 💾 Save modified files

  • ⚠️ Error handling for invalid inputs and file operations


🧠 System Architecture

The application follows a modular design, separating responsibilities across components:

  • FileManager → Handles file reading and writing
  • Editing → Performs byte-level modifications
  • DataDisplay → Displays file content in different formats
  • UserInterface → Manages command-line interaction

This structure improves maintainability, scalability, and clarity.


🧩 Project Structure

file-editor-cpp/
│
├── src/        # Implementation files (.cpp)
├── include/    # Header files (.h)
├── results/    # Screenshots
├── CMakeLists.txt
└── README.md

▶️ How to Run

1. Clone the repository

git clone https://github.com/jessysutherns/file-editor-cpp.git
cd file-editor-cpp

2. Build using CMake

On Windows (Visual Studio / PowerShell)

mkdir build
cd build
cmake ..
cmake --build .

Run:

cd Debug
FileEditor.exe

On Mac/Linux

mkdir build
cd build
cmake ..
make
./FileEditor

📊 Example Output

CLI Interaction

CLI Example

Hex View Example

Hex View


📈 Key Concepts Demonstrated

  • File handling using binary streams
  • Memory management with std::vector<uint8_t>
  • Data representation (hex, binary, ASCII)
  • Modular software architecture
  • Command-line interface design

🛠️ Technologies Used

  • C++ (C++17)
  • CMake
  • Standard Template Library (STL)

🚧 Future Improvements

  • Graphical user interface (GUI)
  • Undo/redo functionality
  • Search and replace features
  • Support for large files and performance optimization

💼 Author

Jessica Sutherns https://github.com/jessysutherns


⭐ Project Significance

This project highlights fundamental systems programming skills, including:

  • Low-level data manipulation
  • File system interaction
  • Structured software design

It demonstrates the ability to build efficient, modular, and functional C++ applications.

About

Command-line file editor in C++ supporting hexadecimal, binary, and character-level file manipulation with modular architecture and CMake build system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors