title: why using of explicit is causing compiler error
body: <p>I have seen many post regarding explicit keyword but no where find the answer for why its failing. I have seen other post in stack overflow also but Regarding the conversion its very confusing kind of explanation given</p>
  
  <pre><code>class Foo {
  public:
    explicit Foo(int x);
  };
  int main()
  {
  Foo a = 42;         //Compile-time error 
  Foo b(42);          //OK: calls Foo::Foo(int) passing 42 as an argument
  }
  </code></pre>
  
  <p>what exactly happening when we are writing <code>Foo a = 42;</code> , and how its differ from <code>Foo b(42);</code></p>