title: Base64 encoding of String in Qt 5
body: <p>I am trying to base64 encode a <code>QString</code> in Qt5 . However, I am getting an error saying <code>identifier not found</code> on line <code>QString b64string = base64_encode(src);</code></p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QByteArray&gt;
  #include &lt;QBitArray&gt;
  #include &lt;QString&gt;
  #include &lt;QDebug&gt;
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
  
      QString src = "Hello";
      QString b64string = base64_encode(src);
  
      qDebug() &lt;&lt; "Encoded string is" &lt;&lt; b64string;
      return a.exec();
  }
  
  QString base64_encode(QString string){
      QByteArray ba;
      ba.append(string);
      return ba.toBase64();
  }
  </code></pre>
  
  <p>Why is the error occurring? can someone point out my mistake?</p>