title: gets() & puts() not declared in scope in dev c++
body: <p>This is my simple code for a bookshop
  There is nothing wrong with the code. I am using DevC++ to run the code and after compling it gives out an error which says 'gets' was not declared in this scope &amp; the same error for puts. Please help me.  </p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;conio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;iomanip&gt;
  #include&lt;cstring&gt;
  
  using namespace std;
  
  class Book
  {
      char *title,*author,*publisher,ans;
      int price,quant,quant_ent;
  
      public:
              Book()
              {
          title = new char[50];
          author = new char[50];
          publisher = new char[50];
          price = quant = quant_ent = 0;
              }
  
          void getdata()
          {
              cout&lt;&lt;"\nEnter The Title";
              gets(title);
              cout&lt;&lt;"\nEnter The Author";
              gets(author);
              cout&lt;&lt;"\nEnter The Publisher";
              gets(publisher);
              cout&lt;&lt;"\nEnter The Price";
              cin&gt;&gt;price;
              cout&lt;&lt;"\nEnter The Quantity";
              cin&gt;&gt;quant;
          }
  
      void display()
      {
          cout&lt;&lt;setw(15)&lt;&lt;title&lt;&lt;setw(15)&lt;&lt;author&lt;&lt;setw(15)&lt;&lt;publisher&lt;&lt;setw(10)&lt;&lt;quant
              &lt;&lt;setw(10)&lt;&lt;price;
      }
  
      void search(char search_title[],char search_author[])
      {
          if(strcmpi(author,search_author)==0)
          {
              if(strcmpi(title,search_title)==0)
              {
                  cout&lt;&lt;"\nBook Found!";
                  cout&lt;&lt;"\nEnter The Quantity: ";
                  cin&gt;&gt;quant_ent;
                  if(quant_ent &lt;= quant)
                  {
                      cout&lt;&lt;"\nThe Title is: ";
                      puts(title);
                      cout&lt;&lt;"\nThe Author is: ";
                      puts(author);
                      cout&lt;&lt;"\nThe Publisher is: ";
                      puts(publisher);
                      cout&lt;&lt;"\nPrice Of Single Copy: "&lt;&lt;price;
                      cout&lt;&lt;"\nTotal Price = "&lt;&lt;price*quant_ent;
                      quant = quant - quant_ent;
                  }
  
                  else
                  {
                      cout&lt;&lt;"\nSufficient Quantity Not Available!";
                  }
              }
          }
      }
  };
  
  
  int main()
  {
  Book obj[10];
  int i=0,ch;
  
  char author[50],title[50];
  
  for(;;)
  {
      cout&lt;&lt;"\n*******MENU********\n1)Enter Details\n2)Buy Book\n3)Display All Books\n4)Exit";
      cin&gt;&gt;ch;
  
      switch(ch)
      {
          case 1:
              obj[i].getdata();
              i++;
              break;
  
          case 2:
              cout&lt;&lt;"\nEnter The Authors Name: ";
              gets(author);
              cout&lt;&lt;"\nEnter The Title: ";
              gets(title);
              for(int j=0;j&lt;i;j++)
              {
                  obj[j].search(title,author);
              }
  
              break;
  
          case 3:
              cout&lt;&lt;setw(15)&lt;&lt;"TITLE"&lt;&lt;setw(15)&lt;&lt;"AUTHOR"&lt;&lt;setw(15)&lt;&lt;"PUBLISHER"&lt;&lt;setw(15)&lt;&lt;"QUANTITY"&lt;&lt;setw(15)&lt;&lt;"PRICE";
              cout&lt;&lt;"\n"&lt;&lt;setw(75)&lt;&lt;"-----------------------------------------------------------------------------------------------------";
              for(int j=0;j&lt;i;j++)
              {
                  cout&lt;&lt;"\n";
                  obj[j].display();
              }
  
          case 4:
              exit(1);
      };
  }
  }
  </code></pre>