How much memory does a C++ pointer use?

前端 未结 6 1845
南方客
南方客 2020-12-17 10:54

I\'m making the (possibly wrong) assumption that it is implementation and/or system dependent. Is there something like INT_MAX or CHAR_BIT that would tell me the size of a p

6条回答
  •  眼角桃花
    2020-12-17 11:37

    #include
    #include
    void main()
    {
        printf(" %d",sizeof(int *));
        printf(" %d",sizeof(char *));
        printf(" %d",sizeof(float *));
        printf(" %d",sizeof(double *));
        getch();
    }
    

提交回复
热议问题