1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#include <iostream>
using namespace std;
void SetStuff(bool* Booler, bool a, bool b, bool c, bool d, bool e, bool f, bool g, bool h)
{
Booler[0] = a;
Booler[1] = b;
Booler[2] = c;
Booler[3] = d;
Booler[4] = e;
Booler[5] = f;
Booler[6] = g;
Booler[7] = h;
for (int x = 0; x<8; x++)
cout << Booler[x] << '|';
cout << endl;
}
int main()
{
bool Cat[8] = { 0 };
for (int x = 0; x<8; x++) // Shows what's inside the array
cout << Cat[x] << '|';
cout << endl;
SetStuff(Cat,false,false,false,true,true,true,true,true); // Tries to fill Cat with the Boolean values)
for (int x = 0; x<8; x++) //Displays the values "0|1|1|0|1|1|1|0|" (What they become)
cout << Cat[x] << '|';
return 0;
}
|