dimanche 26 juillet 2015

How to initialize a double dimensional boolean array/char array with fill function in C++?

I want to initialize a double dimensional array of bool type with true value .

bool a[5][5] = {true}; //Well this won't work

fill(a,a+sizeof(a),true); // This throws an error too. 

how to get this done ?

Aucun commentaire:

Enregistrer un commentaire