Static array vs. dynamic array in C++
问题 What is the difference between a static array and a dynamic array in C++? I have to do an assignment for my class and it says not to use static arrays, only dynamic arrays. I\'ve looked in the book and online, but I don\'t seem to understand. I thought static was created at compile time and dynamic at runtime, but I might be mistaking this with memory allocation. Can you explain the difference between static array and dynamic array in C++? 回答1: Local arrays are created on the stack, and have