The variable cp_arr has been declared as an array of 26 pointers to char. Allocate 26 character values, initialized to the letters 'A' through 'Z' and assign their pointers to the elements of cp_arr (in that order).
.
.
Click on the title for the solution
.
.
for(int i = 0; i < 26; i++)
{
cp_arr[i] = new char;
*(cp_arr[i]) = (char)(65 + i);
}
.
Click on the title for the solution
.
.
This is the answer:
:
for(int i = 0; i < 26; i++)
{
cp_arr[i] = new char;
*(cp_arr[i]) = (char)(65 + i);
}
worked, thanks!
ReplyDelete