2.1.1c++更严格的类型检查

2023-07-08 10:31:02 浏览数 (1)

代码语言:javascript复制
#include <stdio.h>
#include <stdlib.h>
int main() {
    const int a = 10;
    int *pa = (int*)&a;
    char *p = (char*)malloc(100);
    int arr[2][3];
    int **pArr = arr;
    return 0;
}

错误

代码语言:javascript复制
02.1.1.更严格的类型检查.cpp [Error] cannot convert 'int (*)[3]' to 'int**' in initialization 

0 人点赞