title: no match for 'operator=' (operand types are 'book' and '<brace-enclosed initializer list>')
body: <pre><code>    #include&lt;iostream&gt;
      #include &lt;conio.h&gt;
      using namespace std;
  
     struct book
      {  int bookid;
         char title[20];
         float price;
      }b2;
  
   int main()
     {  
       b2={100,&quot;c++ by saurabh&quot;,105.2}; //values initialised during variable declaration
   
       cout&lt;&lt;&quot;\n&quot;&lt;&lt;b2.bookid;
       cout&lt;&lt;b2.title&lt;&lt;&quot;  &quot;&lt;&lt;b2.price;
       return 0;
       getch();
     }
  </code></pre>
  <p>This above code shows error in output like this:</p>
  <blockquote>
  <p>C:\Users\shandude\Documents\codeblock\cprog\struct2.cpp|13|error: no match for 'operator=' (operand types are 'book' and '')|</p>
  <p>C:\Users\shandude\Documents\codeblock\cprog\struct2.cpp|5|note:   no known conversion for argument 1 from '' to 'const book&amp;'|</p>
  </blockquote>