Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
void test3(char * &p){ strcpy( p, "aaaaaaaaaaaaaaaaaaaaaaaaaa"); } char c[] = "123"; test3(c);
上記のコードはコンパイルに失敗しました:
タイプ 'char*' のテンポラリからのタイプ 'char*&' の非 const 参照の初期化
char c[]引数で参照できないのはなぜpですか?
char c[]
p