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.
s = "wendy" のときのように、551 を取得しました。それは何ですか?
for(size_t i = 0; i < s.length(); i++) { sum += s.at(i); }
これは、文字列内の ascii 値の合計です。各文字は、通常 32 から 127 の間の数値に対応します (今のところ、ワイド文字と Unicode は複雑なので無視します)。
さらに詳しい情報が必要な場合は、「Ascii」で検索してみてください。