mardi 25 décembre 2018

How to set value for the specific range of a C array using std:fill

How can i set the value only for specific range of some array and not starting from zero. the following code invokes compile error:

#include <algorithm>;

bool SomeBoolArray[100];
std::fill(SomeBoolArray[50], SomeBoolArray[50] + 10, true);

following form invokes compiler error too.

std::fill(SomeBoolArray[50], SomeBoolArray[60], true);

Aucun commentaire:

Enregistrer un commentaire