View the step-by-step solution to:

# wmummhwwa m n :2 13 14 15 is :7 is 19 20 21 22 23 24 2s 2s 27 2s 29 30 a; 32 a: 34 35 35 :7 laminae domes. mam (string) mam (zstring) using nauespa(e...

Why this char array A[i] in for loop is having an error for index i? See attached jpg file

#include <iostream>

#include <string>

#include <cstring>

using namespace std;

void makeBoolean(int array1[], char array2[]);

int main() {

int A[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

int B[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

char chA[5];

char chB[5];

string strA, strB;

cout << "Enter five lowercase letters a - n with no spaces for set A: ";

cin >> strA;

cout << "Enter five lowercase letters a - n with no spaces for set B: ";

cin >> strB;

for (int i = 0; i < 5; i++) {

char A[i] = strA[i];

char chB[i] = strB[i];

}

makeBoolean(A, chA);

makeBoolean(B, chB);

cout << "The binary representation for character set A is: ";

for (int i = 0; i < 14; i++)

cout << A[i];

wmummhwwa m
n
:2
13
14
15
is
:7
is
19
20
21
22
23
24
2s
2s
27
2s
29
30
a;
32
a:
34
35
35
:7 laminae domes.» mam (string)
mam (zstring) using nauespa(e std; ma nakeBoalean(int mam], (har arrayzu); am naino ( int An = ( a, a, a, a, a, a, a, a, a, a, a, a, a, e );
int an = ( a, a, a, a, a, a, a, a, a, a, a, a, a, e );
(her mus]; (her snap]; string sun, strB; (out &lt;&lt; &quot;Enter five lmrzase leuers a , n with no spases for set A:
(in &gt;&gt; strA; (out &lt;&lt; &quot;Enter five lmrzase leuers a , n with no spases for set a: -,
(in &gt;&gt; strB; for (int i a i &lt; s; iH) (
(her nu] strA[i];
(her mm] strB[i]; “Rule“ W upm’m nus! m a sum.“ valu:
“Rule“ (5* 0.: valu: 01 valiabk‘ [dxlalad 3| n»: 5) cannm I): m as a (9mm (out &lt;&lt; &quot;The Inner], represenl'ailon for Eha'razier'set'A 15. for (int i = a; i &lt; 14; iH)
(out &lt;&lt; Aﬁ];

Hello! this is due the word char before the A[i] and chB[i] When you put a data type before the name of a variable the... View the full answer

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents