You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.2 KiB
32 lines
1.2 KiB
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/09/05 08:49:45 by narnaud #+# #+# */
|
|
/* Updated: 2022/09/05 11:00:32 by narnaud ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "Array.hpp"
|
|
|
|
int main(void) {
|
|
Array<char> a;
|
|
Array<char> b(10);
|
|
Array<char> c(b);
|
|
|
|
b[3] = 'b';
|
|
std::cout << b[3] << std::endl;
|
|
std::cout << b.size() << std::endl;
|
|
std::cout << c[3] << std::endl;
|
|
c = b;
|
|
std::cout << c[3] << std::endl;
|
|
|
|
try {
|
|
std::cout << b[12] << std::endl;
|
|
} catch (std::exception &e) {
|
|
std::cout << e.what() << std::endl;
|
|
}
|
|
}
|
|
|