Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

pointer to complete array does not convert implicitly to pointer to ar...

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.52 sec, absolute service time: 0,7 sec 
edit mode |  history  | discussion
Error(s):
source_file.cpp:6:5: warning: no previous extern declaration for non-static variable 'a' [-Wmissing-variable-declarations]
int a[] {10, 20, 30, 40, 50};
    ^
source_file.cpp:13:11: error: cannot initialize a variable of type 'int (*)[]' with an rvalue of type 'int (*)[5]'
    int (*p)[] = &a;
          ^      ~~
1 warning and 1 error generated.

        

    
                
λ
.NET NoSQL database for rapid development