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*ます。この関数には、次のパラメーターがあります。
const char*
string str;
str を変換するには、const char*を使用しますstr.c_str()。
str.c_str()
str.c_str()デバッグすると、文字列の値の前に何か (アドレスだと思います) が含まれていることに気付きます。例: str="0" の場合、str.c_str()0x68d5f9 "0" を使用します。それはなぜです?文字列の値だけを取得するにはどうすればよいですか?