Files
cpp07/ex02/Array/Array.tpp
2026-03-22 21:27:19 +01:00

62 lines
1.6 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Array.tpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/21 17:09:36 by aortigos #+# #+# */
/* Updated: 2026/03/22 14:52:48 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
// Construction with no parameter -> creates an empty array
// Construction with an unsigned int n as parameter
// Consctrucion by copy and assignment operator
// operator new [] to allocate memory
// Access elements by operator []
// Exception if access index out of bounds
// Function size
template <typename T>
Array<T>::Array() : data(NULL), _size(0)
{
// std::cout << "Default constructor called" << std::endl;
}
template <typename T>
Array<T>::Array(unsigned int n)
{
}
template <typename T>
Array(const Array &other)
{
}
template <typename T>
Array &operator=(const Array &other)
{
}
template <typename T>
~Array()
{
}
template <typename T>
T &operator[](unsigned int i)
{
}
template <typename T>
unsigned int size() const
{
}