「🔨」 fix(ex02): added a const operator[] overload (readonly ofc)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user