Pay attention to base64_decode in http://www.adp-gmbh.ch/cpp/common/base64.html
base64_decode
std::string base64_decode(std::string const& encoded_string)
You need an array of character( not string) to store the binary data. Best is use vector.