B
Busin
valarray<bool> va1(10);
// Initialize va1 here?
valarray<bool> va2 (80);
va2 = va1;
Do we have to initialize va1 like using for loop above (since if not, the
printout of va1 will display garbage)?
Can va1 be initialized like "valarray<bool> va1(10, false);" when defining
it?
Is it ok to assign va1 to va2? Does va2 have to be specified with a size
before assigning va1 to it? Must the size of va2 be larger than va1?
Thanks!
// Initialize va1 here?
valarray<bool> va2 (80);
va2 = va1;
Do we have to initialize va1 like using for loop above (since if not, the
printout of va1 will display garbage)?
Can va1 be initialized like "valarray<bool> va1(10, false);" when defining
it?
Is it ok to assign va1 to va2? Does va2 have to be specified with a size
before assigning va1 to it? Must the size of va2 be larger than va1?
Thanks!