Template-based dynamic array implementation in C++ with custom exception handling and bounds checking.
- Course: CST211 - Data Structures
- Assignment: Assignment 1 - Array
- Institution: Oregon Institute of Technology
- Template-based generic array implementation
- Custom start index support
- Bounds checking with exception handling
- Dynamic memory management
- Copy constructor and assignment operator overloading
- Array subscript operator overloading
- Type: Template class supporting generic types
- Memory Management: Dynamic allocation with proper cleanup
- Index Handling: Configurable start index (not limited to 0)
- Exception Safety: Custom exception class for error handling
getStartIndex()/setStartIndex(int)- Manage array base indexgetLength()/setLength(int)- Manage array sizeoperator[]- Bounds-checked element accessoperator=- Deep copy assignmentReAllocator(int)- Dynamic resizing
array.h- Array class template declarationException.h/Exception.cpp- Custom exception handlingSource.cpp- Test driver and usage examples
This project uses Visual Studio solution files:
# Open in Visual Studio
Array.sln- Template programming in C++
- Dynamic memory management
- Operator overloading
- Exception handling
- RAII principles
- Generic data structure implementation
- C++
- Visual Studio
- Template metaprogramming