Link to home
Start Free TrialLog in
Avatar of mustish1
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.


Avatar of phoffric
phoffric

I don't see the code.
Avatar of mustish1

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
If you have, for example, bracket i bracket, then that is a symbol for italics. Put the code in a code block.
#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;
}

Open in new window

error.txt
ASKER CERTIFIED SOLUTION
Avatar of phoffric
phoffric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It works. Thanks.
You're welcome.  I meant to say:
Replacing with "True" does provide a character literal string, but ...