Is it valid, to use std::string to hold binary data, to avoid manual dynamic memory management

后端 未结 5 1797
醉话见心
醉话见心 2021-02-05 00:55

Pay attention to base64_decode in http://www.adp-gmbh.ch/cpp/common/base64.html

std::string base64_decode(std::string const& encoded_string)
         


        
5条回答
  •  野的像风
    2021-02-05 01:55

    Yes, you can store any sequence of char in a std::string. That includes any binary data.

提交回复
热议问题