【在 m***t 的大作中提到】 : donto know if c++ has such limit, but c does not care. you can only detect : that at run time.
j*r
4 楼
That depends on the location of newly allocated memory space. If you use new to allocate a new array, it is allocated in heap. I remeber available space in heap is huge because of virtual memory. In addition, heap is well managed so that error is returned if your memory allocation request can not be satisfied. If you use static definition (like vector vec[10000]), it is allocated in stack. In linux, some systems have default limitation about the stack size. You can use unlimit command to chec