🔨」 fix(ex02): added a const operator[] overload (readonly ofc)

This commit is contained in:
2025-08-18 20:01:42 +02:00
parent e0535f2b4a
commit cbd45d0f14
2 changed files with 11 additions and 1 deletions

View File

@@ -17,7 +17,8 @@ int main(int, char**)
//SCOPE
{
Array<int> tmp = numbers;
Array<int> test(tmp);
const Array<int> test(tmp);
std::cout << "accessing a const value : " << (int) test[15] << std::endl;
}
std::cout << "checking if values are the same after a copy..." << std::endl;