title: How can I convert my program to work with new c++ standard? <iostream.h> etc
body: <p>How can I convert my program to work with new c++ standard? I have problem with <code>&lt;iostream.h&gt;</code> etc.</p>
  
  <pre><code>main.cpp:3:22: fatal error: iostream.h: No such file or directory 
  #include &lt;iostream.h&gt;
            ^
  compilation terminated.
  </code></pre>
  
  <p>Here is online compilator:</p>
  
  <p><a href="http://www.compileonline.com/compile_cpp11_online.php" rel="nofollow">http://www.compileonline.com/compile_cpp11_online.php</a></p>
  
  <pre><code>#include &lt;iostream.h&gt;
  #include &lt;fstream.h&gt;
  #include &lt;string.h&gt;
  #include &lt;iomanip.h&gt;
  #include &lt;conio.h&gt;
  
  class phoneBook{
      char name[20],phno[15];
      public:
      void getdata();
      void showdata();
      char *getname(){ return name; }
      char *getphno(){ return phno; }
      void update(char *nm,char *telno){
          strcpy(name,nm);
          strcpy(phno,telno);
      }
  };
  
  void phoneBook :: getdata(){
      cout&lt;&lt;"\nEnter Name : ";
      cin&gt;&gt;name;
      cout&lt;&lt;"Enter Phone No. : ";
      cin&gt;&gt;phno;
  }
  
  void phoneBook :: showdata(){
      cout&lt;&lt;"\n";
      cout&lt;&lt;setw(20)&lt;&lt;name;
      cout&lt;&lt;setw(15)&lt;&lt;phno;
  }
  
  
  void main(){
      phoneBook rec;
      fstream file;
      file.open("d:\\phone.dat", ios::ate | ios::in | ios::out | ios::binary);
      char ch,nm[20],telno[6];
      int choice,found=0;
      while(1){
          clrscr();
          cout&lt;&lt;"\n*****Phone Book*****\n";
          cout&lt;&lt;"1) Add New Record\n";
          cout&lt;&lt;"2) Display All Records\n";
          cout&lt;&lt;"3) Search Telephone No.\n";
          cout&lt;&lt;"4) Search Person Name\n";
          cout&lt;&lt;"5) Update Telephone No.\n";
          cout&lt;&lt;"6) Exit\n";
          cout&lt;&lt;"Choose your choice : ";
          cin&gt;&gt;choice;
          switch(choice){
              case 1 : //New Record
                   rec.getdata();
                   cin.get(ch);
                   file.write((char *) &amp;rec, sizeof(rec));
                   break;
  
              case 2 : //Display All Records
                   file.seekg(0,ios::beg);
                   cout&lt;&lt;"\n\nRecords in Phone Book\n";
                   while(file){
                      file.read((char *) &amp;rec, sizeof(rec));
                      if(!file.eof())
                          rec.showdata();
                   }
                   file.clear();
                   getch();
                   break;
  
              case 3 : //Search Tel. no. when person name is known.
                   cout&lt;&lt;"\n\nEnter Name : ";
                   cin&gt;&gt;nm;
                   file.seekg(0,ios::beg);
                   found=0;
                   while(file.read((char *) &amp;rec, sizeof(rec)))
                   {
                      if(strcmp(nm,rec.getname())==0)
                      {
                          found=1;
                          rec.showdata();
                      }
                   }
                   file.clear();
                   if(found==0)
                      cout&lt;&lt;"\n\n---Record Not found---\n";
                   getch();
                   break;
  
              case 4 : //Search name on basis of tel. no
                   cout&lt;&lt;"\n\nEnter Telephone No : ";
                   cin&gt;&gt;telno;
                   file.seekg(0,ios::beg);
                   found=0;
                   while(file.read((char *) &amp;rec, sizeof(rec)))
                   {
                      if(strcmp(telno,rec.getphno())==0)
                      {
                          found=1;
                          rec.showdata();
                      }
                   }
                   file.clear();
                   if(found==0)
                      cout&lt;&lt;"\n\n---Record Not found---\n";
                   getch();
                   break;
  
              case 5 : //Update Telephone No.
                   cout&lt;&lt;"\n\nEnter Name : ";
                   cin&gt;&gt;nm;
                   file.seekg(0,ios::beg);
                   found=0;
                   int cnt=0;
                   while(file.read((char *) &amp;rec, sizeof(rec)))
                   {
                      cnt++;
                      if(strcmp(nm,rec.getname())==0)
                      {
                          found=1;
                          break;
                      }
                   }
                   file.clear();
                   if(found==0)
                      cout&lt;&lt;"\n\n---Record Not found---\n";
                   else
                   {
                      int location = (cnt-1) * sizeof(rec);
                      cin.get(ch);
                      if(file.eof())
                          file.clear();
  
                      cout&lt;&lt;"Enter New Telephone No : ";
                      cin&gt;&gt;telno;
                      file.seekp(location);
                      rec.update(nm,telno);
                      file.write((char *) &amp;rec, sizeof(rec));
                      file.flush();
                   }
                   break;
              case 6 : gotoout;
          }
      }
  out:
  file.close();
  }
  </code></pre>