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.
itoa を使用して base64 文字列を作成できることはわかっていますが、同じ方法で base64 で数値を計算する簡単な方法があるかどうか疑問に思いました cout << hex は、整数値を 16 進数で表示するフラグを設定します...
組み込みの方法はありません (setbaseパラメーターとして 8、10、16 のみを受け入れます)。独自のストリーム マニピュレータを作成する必要があります。
setbase
古いコードですが有効なxstreambuf