I'm learning C++ on codesdope.com and I have read a document on another website, learncpp.com. But these two websites have different ways to assign values to the array.
//codesdope.com
std::array<int,5> n 1;
//learncpp.com
std::array<int,5> n = {1,2,3,4,5};
Which way is more accurate? Which way should I choose? What is the difference between them?
Aucun commentaire:
Enregistrer un commentaire