めんくりの投稿

@menkuri

もちろん char hello[] = "hello"; char* hello_ptr = hello; // decay, hello = &hello[0] とした場合は hello_ptr の指す先はスタック領域の配列になっているので、 hello_ptr[2] = 'L'; のように書き換え可能であり、char* だからといって必ず const を付けるわけではない 3/3