函數不能傳遞動態內存

下面這道面試題是有關指針、動態內存分配的相關內容,感受比較經典,記錄下來你們共享。 問題:ios What will happen after running the "Test"?面試 #include <iostream> using namespace std; void GetMemory(char* p, int num) { p = (char*)malloc(sizeof(char
相關文章
相關標籤/搜索