vendredi 30 octobre 2015

Cout a whole array in c++

I am fairly new to c++, is there a way in c++ through which we can cout a whole static array apart from iterating via a for loop?

int arra[10] = {1,2,3,4};
std::cout << arra << std::endl;

I tried this but, this is printing address of the first element in the array.

Aucun commentaire:

Enregistrer un commentaire