mustish1
asked on
Boolean Array
Hi guys: Can any one please tell me if this is the right way to create a boolean array in C++ ? Thanks.
I don't see the code.
ASKER
it just keep giving me this error when i try to post the code
All tags must have a closing tag.
there is no itag in the code
All tags must have a closing tag.
there is no itag in the code
If you have, for example, bracket i bracket, then that is a symbol for italics. Put the code in a code block.
ASKER
#include <iostream>
using namespace test;
int main()
{
bool answers[3] [5] = {};
int i = 0, j = 000;
answers[0][0] = 'True';
answers[0][1] = 'True';
answers[0][2] = 'True';
answers[0][3] = 'True';
answers[0][4] = 'True';
answers[1][0] = 'True';
answers[1][1] = 'True';
answers[1][2] = 'True';
answers[1][3] = 'True';
answers[1][4] = 'True';
answers[2][0] = 'True';
answers[2][1] = 'True';
answers[2][2] = 'True';
answers[2][3] = 'True';
answers[2][4] = 'True';
do
{
while(i < 3)
{
cout << answers[i][j] << endl;
i++;
}
i = 0;
j++;
cout << endl;
} while(j < 5);
system("pause");
return 0;
}
error.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works. Thanks.
You're welcome. I meant to say:
Replacing with "True" does provide a character literal string, but ...
Replacing with "True" does provide a character literal string, but ...