title: Showing an image using c++
body: <p>I've written this code for showing an image in c++. </p>
  
  <pre><code>#include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/imgcodecs.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  using namespace cv;
  
  int main(int x,char*y) 
  {
      string Image_Name = y[1];
  
  
      Mat image=imread(Image_Name);
  
  
      if (image.empty())
      {
          cout &lt;&lt; "This is invalid input" &lt;&lt; endl;
          return -1; 
      }
  
      namedWindow("Lenna", WINDOW_NORMAL);
  
      imshow("Lenna",image);
  
      waitKey(0);
  
      return 0;
  
  }
  </code></pre>
  
  <p>When I try to run it ,Compiler shows me these errors :</p>
  
  <blockquote>
    <p>"Severity Code    Description Project File    Line
    Error C2440   'initializing': cannot convert from 'char' to
    'std::basic_string,std::allocator>' OpencvTest  e:\programming
    c\showing an image\opencvtest\source.cpp  12 "</p>
  </blockquote>
  
  <p>and :</p>
  
  <blockquote>
    <p>"Severity Code    Description Project File    Line Error (active)     no
    suitable constructor exists to convert from "char" to
    "std::basic_string,
    std::allocator>"    OpencvTest  e:\programming C\Showing an
    image\OpencvTest\Source.cpp   12"</p>
  </blockquote>
  
  <p>Can anyone help me with this error?</p>