I really confuse the definition of this type of pointer:
char *notes[] = {"Ab", "F#", "B", "Gb", "D"};`.
I understand that noteshere is an array of char pointers, which, as I understand it, as elements of notes, should be the addresses of char typed variables. Where am I mistaken? So how does it work?
#include<iostream>
#include<string>
using namespace std;
int main()
{
char *notes[] = {"Ab", "F#", "B", "Gb", "D"};
cout << *(char**)(notes+2);
}
And what does it do char**and what is its significance?
source
share