首页 > 解决方案 > 输出的含义

问题描述

# include <iostream>

int main()
{
    char* cptr{new char};
    std::cout << cptr;
    delete cptr;
}

输出:

debug.

为什么?我期待一个地址。

标签: c++chardynamic-memory-allocation

解决方案


推荐阅读