+ 10
Alex Wyre
if you know size at compile time use std::array and if you want it to be dynamically sized them look about std::vector
we normally dont use fixed size array in C++
- https://en.cppreference.com/w/cpp/container/array
- https://en.cppreference.com/w/cpp/container/vector
+ 5
Snehil Pandey
yes , we can ..
You can use std::vector.
But type of element should be same .
Thera ways to get around that too
+ 5
Ash [God Of Love & Life]âš
std::list is same a linked list
+ 5
https://code.sololearn.com/cfhz4175K0KV/?ref=app
Hope this helps..
Just a simple implementation...
You can also use std::any instead of Var class
+ 2
Prashanth Kumar do you know?
well as I think it's not possible in C++.
+ 2
Prashanth Kumar can we have an array in C++ like python list