C與C++中的 const 改變時的區別

1. C語言 #include <stdio.h> #define PAUSE printf("Press Enter key to continue - By WangLei ..."); fgetc(stdin); int main() { const int n = 10; // &n得到的指針的類型是const int *,必須強制轉換爲int *後才能賦給 p,否則類型是不兼
相關文章
相關標籤/搜索