Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Family Tree - C++

A C++ program that models a family tree using smart pointers and recursive algorithms. Uses the Griffin family from Family Guy as example data.

Features

  • Count total members in a family tree
  • Print the full family tree visually
  • Check if two people are related

Concepts Used

  • Smart pointers (shared_ptr and weak_ptr)
  • Cycle detection with unordered_set
  • Recursive tree traversal
  • Object-oriented design with classes

What I Learned

  • How weak_ptr prevents circular reference memory leaks
  • How to traverse trees recursively
  • How to detect already-visited nodes to avoid infinite loops

Project Info

Originally created: February 22, 2026 Course: Advanced Data Structures

About

C++ family tree program using smart pointers and recursive algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages