Sample code for 30+ languages & platforms
C++

Decode Base64

Demonstrates how to decode base64.

Chilkat C++ Downloads

C++
#include <CkBinData.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkBinData bd;

    //  Append a base64 string to bd.
    success = bd.AppendEncoded("c2VjcmV0","base64");

    //  The bd now contains the decoded bytes.
    //  Let's say it was a password string..
    const char *password = bd.getString("utf-8");

    //  Decodes to "secret".
    std::cout << "password = " << password << "\r\n";
    }