Skip to content

knothing01/vector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vector Implementation in C

This project provides a basic implementation of a dynamic array, commonly known as a vector, in C++. It serves as a learning exercise for understanding how dynamic arrays work and how to implement them in C.

Features

  • Dynamic Array: Implements a dynamic array that can resize itself as elements are added.
  • Element Access: Provides methods for accessing elements by index.
  • Capacity Management: Tracks and manages the capacity of the array.
  • Insertion and Erasure: Includes functions for inserting and erasing elements at specified positions.
  • Clear: Clears all elements from the vector.
  • At: Accesses elements at a specified position with bounds checking.
  • Front and Back: Retrieves the first and last elements of the vector.
  • Shrink to Fit: Reduces the capacity of the vector to fit its size.

Usage

  1. Clone the Repository:
    git clone https://github.com/knothing01/Vector.git

About

Simple vector implementation in C //first project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages