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.
文字列が定数かどうかを確認するにはどうすればよいですか?
お気に入りconst char *name;
const char *name;
name が C 言語の定数かどうかを確認したい。
どうすればいいですか?
私が知っているように、 const はコンパイル時の概念であり、キャストすることができるため、変数が定数であるかどうかを実際に確認することはできません。
ここで、いくつかの詳細を確認できます。