memory - C++ difference between

memory - C++ difference between "char *" and "char * = new char ...

瀏覽:363
日期:2025-04-30
In the first case, a[2] stores 2 chars on the stack. In the second case, there is no allocation at all - a is an uninitialized pointer. In the third case, 2 chars ......看更多