I was wondering if there is an easy way to set more than one element of an array in a single line of code. For example, instead of:
int Array[10];
Array[4] = 100;
Array[7] = 100;
Is there some way to do something like the following?
int Array[10];
Array[4 & 7] = 100;
I know the above code doesn't work, but I can't really think of any other way to display my question. Anyhow, thanks in advance to anyone who would like to share their opinion :)
{ int* a = Array; a[4] = a[7] = 100; }.