title: In C++98 'dvd1' must be initialized by constructor, not by '{...}'
body: <p>How do I initialize dvd1?</p>
  <p><code>C:\Users\SuperUser\Google Drive&gt;g++ -o a Question1.cpp</code></p>
  <blockquote>
  <p>Question1.cpp: In function 'int main()':</p>
  <p>Question1.cpp:39:76: error: in C++98 'dvd1' must be initialized by constructor, not by '{...}'</p>
  <p>dvd dvd1 = {&quot;Zombie&quot;,&quot;BBC&quot;,&quot;James&quot;,&quot;English&quot;,&quot;Alw&quot;,2012,20170601,20170630};</p>
  </blockquote>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  class dvd
  {
      string movieName,movieProdComp,movieLeadActor,movieLanguage,renterName;
      int releaseYear,rentDate,returnDate;
      public:
          
          dvd(string mn,string mpc,string mla,string ml, string rn,int ry,int rd,int retd);
          void print();
  };
  
  dvd::dvd(string mn,string mpc,string mla,string ml, string rn, int ry,int rd,int retd){
      movieName=mn;
      movieProdComp=mpc;
      movieLeadActor=mla;
      movieLanguage=ml;
      renterName=rn;
      releaseYear=ry;
      rentDate=rd;
      returnDate=retd;
  }
  
  void dvd::print(){
      cout&lt;&lt;&quot;Movie:&quot;&lt;&lt;movieName&lt;&lt;endl;
      cout&lt;&lt;&quot;Production:&quot;&lt;&lt;movieProdComp&lt;&lt;endl;
      cout&lt;&lt;&quot;Starring:&quot;&lt;&lt;movieLeadActor&lt;&lt;endl;
      cout&lt;&lt;&quot;Language:&quot;&lt;&lt;movieLanguage&lt;&lt;endl;
      cout&lt;&lt;&quot;Rented By:&quot;&lt;&lt;renterName&lt;&lt;endl;
      cout&lt;&lt;&quot;Released:&quot;&lt;&lt;releaseYear&lt;&lt;endl;
      cout&lt;&lt;&quot;Rent Date:&quot;&lt;&lt;rentDate&lt;&lt;endl;
      cout&lt;&lt;&quot;Return Date:&quot;&lt;&lt;returnDate&lt;&lt;endl;
  }
  
  int main(){
      dvd();
      dvd dvd1 = {&quot;Zombie&quot;,&quot;BBC&quot;,&quot;James&quot;,&quot;English&quot;,&quot;Alw&quot;,2012,20170601,20170630};
      dvd1.print();
  }
  </code></pre>