Lets have the files with the following contents:
file1.cpp
: double array[100];
file2.cpp
(client of file1.cpp
):
/// What the difference between this:
extern double* array;
/// and this?
extern double array[];
If I use array declared in the first way I receive segfault. If second, it works ok. It confuses me, since in a regular C++ programm I can easily do the following and these objects would be equal:
double array[100];
double* same_array = array;
/// array[0] is equal to same_array[0] here
/// But why they are not equal in the example with extern?