+ 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
1st Nov 2022, 5:43 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 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
2nd Nov 2022, 7:49 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 5
Ash [God Of Love & Life]✹ std::list is same a linked list
2nd Nov 2022, 10:20 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 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
2nd Nov 2022, 11:11 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
Prashanth Kumar do you know? well as I think it's not possible in C++.
1st Nov 2022, 5:34 PM
Random
Random - avatar
+ 2
Prashanth Kumar can we have an array in C++ like python list
2nd Nov 2022, 4:18 AM
Random
Random - avatar