title: Reading bmp file for steganography
body: <p>I am trying to read a bmp file in C++(Turbo). But i m not able to print binary stream.</p>
  
  <p>I want to encode txt file into it and decrypt it.
  How can i do this. I read that bmp file header is of 54 byte. But how and where should i append txt file in bmp file. ?</p>
  
  <p>I know only Turbo C++, so it would be helpfull for me if u provide solution or suggestion related to topic for the same.</p>
  
  <pre><code>int main()
  {
  ifstream fr; //reads
  ofstream fw; // wrrites to file
  char c;
  int random;
  clrscr();
  char file[2][100]={"s.bmp","s.txt"};
  
  fr.open(file[0],ios::binary);//file name, mode of open, here input mode i.e. read only
  if(!fr)
      cout&lt;&lt;"File can not be opened.";
  fw.open(file[1],ios::app);//file will be appended
  if(!fw)
      cout&lt;&lt;"File can not be opened";
  while(!fr)
      cout&lt;&lt;fr.get(); // error should be here. but not able to find out what error is it
  
  fr.close();
  fw.close();
  getch();
  }
  </code></pre>
  
  <p>This code is running fine when i pass txt file  in binary mode</p>
  
  <p><strong>EDIT :</strong> </p>
  
  <pre><code>while(!fr)
      cout&lt;&lt;fr.get(); 
  </code></pre>
  
  <p>I am not able to see binary data in console
  this was working fine for text when i was passing character parameter in fr.get(c)</p>