“初始化“::無法從const char* 轉換為char*
C和C++11有所不同,C中可以用下面的語句
1 char *a="hello"; 2 char *b={"hello","world"};
而在C++11中應改成
1 const char *a="hello"; 2 const char *b[]={"hello","world"}
C和C++11有所不同,C中可以用下面的語句
1 char *a="hello"; 2 char *b={"hello","world"};
而在C++11中應改成
1 const char *a="hello"; 2 const char *b[]={"hello","world"}
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。