title: How to copy turbo c++ output?
body: <p>How to copy turbo c++ output? I already Googled the problem but in vain. It says press print scrn and paste or right click and mark all and paste. I tried the both but not working. The problem is that it's only copying what is present on the current screen. But I want the whole screen from the beginning. (alt+printscrn not working either). How can I tackle this situation.</p>
  
  <pre><code>printScrn
  Alt+printScrn
  markall
  </code></pre>
  
  <p>none of them are working !! </p>
  
  <p>for some reason i need this old way of programming i can't help with it but i would like to get a solution for the same . i have tried redirecting the output stream to the the file this way but it won't works .</p>
  
  <pre><code>#include&lt;iostream.h&gt;
  #include&lt;conio.h&gt;
  #include&lt;stdlib.h&gt;
  const int max=50;
  class dequeue{
  int dq[max],r,f,c,x,i;
  public:
  dequeue();
  void insertRear();
  void insertFront();
  void deleteFront();
  void display();
  };
  dequeue::dequeue(){
  f=r=-1;
  c=0;
  }
  void dequeue::insertRear()
  {
  if((f==r+1)||(f==0)&amp;&amp;(r==max-1)){
  cout&lt;&lt;"overflow";
  return;
  }
  if(f==-1)
  f=r=0;
  else
  {
  if(r==max-1)
  r=0;
  else
  r++;
  }
  cout&lt;&lt;"enter element";
  cin&gt;&gt;x;
  dq[r]=x;
  c++;
  }
  void dequeue::insertFront(){
  if((f==r+1)||(f==0)&amp;&amp;(r==max-1)){
  cout&lt;&lt;"overflow";
  return;
  }
  if(f==-1)
  f=r=0;
  else
  {
  if(f==0)
  f=max-1;
  else
  f++;
  }
  cout&lt;&lt;"enter element:";
  cin&gt;&gt;x;
  dq[f]=x;
  c++;
  }
  void dequeue::deleteFront(){
  if(f==-1){
  cout&lt;&lt;"deque empty";
  return;
  }
  x=dq[f];
  c--;
  if(f==r)
  f=r=-1;
  else{
  if(f==max-1)
  f=0;
  else
  f++;
  }
  cout&lt;&lt;x&lt;&lt;"deleted!!!";
  }
  void dequeue::display(){
  if(f==-1){
  cout&lt;&lt;"dequeue empty";
  return;
  }
  cout&lt;&lt;"\n"&lt;&lt;c&lt;&lt;"item in deque are:";
  cout&lt;&lt;"\n(front)";
  i=f;
  if(i!=-1){
  while(1){
  cout&lt;&lt;" "&lt;&lt;dq[i];
  if(i==r)
  break;
  if(i==max-1)
  i=0;
  else
  i++;
  
  }
  }
  cout&lt;&lt;"(rear)";
  }
  void main(){
  freopen("output.txt","w",stdout); //this is not working
  clrscr();
  dequeue d;
  int ch;
  do{
  cout&lt;&lt;"\n Menu";
  cout&lt;&lt;"\n 1.insert at front";
  cout&lt;&lt;"\n 2.insert at rear";
  cout&lt;&lt;"\n 3.delet from front";
  cout&lt;&lt;"\n 4.display";
  cout&lt;&lt;"\n 5.exit \n";
  cout&lt;&lt;"Enter your choice:";
  cin&gt;&gt;ch;
  switch(ch){
  case 1:
  d.insertFront();
  break;
  case 2:
  d.insertRear();
  break;
  case 3:
  d.deleteFront();
  break;
  case 4:
  d.display();
  break;
  case 5:
  exit(0);
  break;
  default:
  cout&lt;&lt;"\n invalid";
  }
  }
  while(ch!=5);
  getch();
  }
  </code></pre>