I want to read a base64 encoded file in Linux. I think I can open it as text mode. I tried with a simple code with a while loop to read each line from the file opened as text & it can display the expect contents onto display. This displayed output is same as the output of "cat <file>".
2 questions;
1. Is it correct to read this base64 encode file as text?
2. I know how to take a text file into a string using "stringstream" but when I try the same code, it does not work. Any idea?
What am I doing wrong with this handling of bsae64 cncoded file?
// function to convert file to a string
string FileToString(string filename)
{