Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Double pointer difference when using with array

Tags:

c++

Is there a difference between the following two lines and if so what is it? (in C++)

float (**a[10]);
float *(*a[10]);
like image 996
Maggick Avatar asked Aug 07 '26 22:08

Maggick


1 Answers

No. Try

float (**a[10]);
float *(*b[10]);
if (typeid(a) == typeid(b))
    printf("==\n");
else
    printf("!=\n");

The output is

==
like image 76
AlexD Avatar answered Aug 10 '26 11:08

AlexD