https://github.com/cvcpatton/anagram-generator
A console-based C++ application that generates anagrams of a user-provided word. Demonstrates string manipulation, loops, and randomization.
https://github.com/cvcpatton/anagram-generator
anagram-generator console-application cpp stl string-manipulation
Last synced: 9 months ago
JSON representation
A console-based C++ application that generates anagrams of a user-provided word. Demonstrates string manipulation, loops, and randomization.
- Host: GitHub
- URL: https://github.com/cvcpatton/anagram-generator
- Owner: cvcpatton
- Created: 2025-09-23T17:07:51.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-23T18:26:26.000Z (9 months ago)
- Last Synced: 2025-09-23T19:12:23.262Z (9 months ago)
- Topics: anagram-generator, console-application, cpp, stl, string-manipulation
- Language: C++
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Anagram Generator 🔤
(In process, September 23, 2025)
A console-based C++ application that generates anagrams of a user-provided word. Demonstrates string manipulation, loops, and randomization.
**Features**
* Accepts user input of any word.
* Generates random anagrams by shuffling characters.
* Ensures valid permutations without repeating identical output.
* Lightweight and runs entirely in the console.
**Tech Stack**
* C++ – core logic and execution
* STL – string handling and randomization
**How to Run**
1. Clone this repository:
```bash
git clone https://github.com/yourusername/cpp-anagram-generator.git
cd cpp-anagram-generator
2. Compile the program:
g++ anagram.cpp -o anagram
3. Run the executable:
./anagram
**Sample Output**
```
Enter a name or phrase:
hot chocolate
Anagram combinations using all letters (max 3 words):
a cloche tooth
a hooch toltec
ace cloth hoot
etc.
```
**Data Source**
My file words.csv is based on [eng_41320.csv](https://gist.github.com/diplodata/be26123b3f45a7ffab36426da2d2ee1f)
**Compatibility Notes**
This C++ anagram generator has been tested in the following environments:
* OneCompiler.com ✅
-- Compiles and runs correctly
* OnlineGDB.com ⚠️
-- File access to 'words.csv' may not be supported; tries to compile the csv file
Recommendation: Use OneCompiler or a local compiler (C++14 or later) for best results.