動態配置與釋放記憶體

動態配置與釋放記憶體

瀏覽:1049
日期:2024-05-14
動態配置與釋放記憶體 語法︰ C 語言中容許程式設計者在需要使用記憶體時才自作業系統配置所需的記憶體, 而不需在程式設計時就預估所需要的記憶體。 例如︰ int numberOfElements; int *iAry; numberOfElements = 750; iAry = (int *) malloc(numberOfElements ......看更多