I am new to c++ and I have a question about the array of pointers. In the following program
#include <iostream>
using namespace std;
int main(){
char b[10];
char* a[10];
b[0] = 'b';
a[0] = &b[0];
cout << a[0] << endl;
return 0;
}
a is an array of pointers pointing to char objects. a[0] is then assigned the address of b[0], but why the cout result is a c-string b
rather than the its address ? I thought a[0] should be storing a pointer. Thank you very much in advance.