我编了这样一段程序,在C++中老是通不过编译,为什么? #include <stdio.h>
void main() { int a[2][3],*p=a; int i,j; for (i=0;i<2; i++) for (j=0; j<3; j++); scanf("%d",p+i*3+j); for(i=0;i<2;i++) { printf("\n"); for (j=0; j<3;j++) printf("%d", *(p+i*3+j)); } } 错误提示信息: E:\XiaoHu\C\7\7.cpp(5) : error C2440: 'initializing' : cannot convert from 'int [2][3]' to 'int *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast