title: Stop working program with QcustomPlot basic code in QT application (VS plugin)
body: <p>I'm trying to use QCustomPlot example (below) in VS2012 , 64 bit Win7 with Qt plugin <a href="http://www.qcustomplot.com/index.php/tutorials/basicplotting" rel="nofollow">http://www.qcustomplot.com/index.php/tutorials/basicplotting</a></p>
  
  <pre><code>#include "customf.h"
  #include "../../qcustomplot.h"
  
  customf::customf(QWidget *parent)
      : QMainWindow(parent)
  {
      ui.setupUi(this);
  
  QCustomPlot * customPlot; 
  
  // code from example
  // generate some data:
  QVector&lt;double&gt; x(101), y(101); // initialize with entries 0..100
  for (int i=0; i&lt;101; ++i)
  {
    x[i] = i/50.0 - 1; // x goes from -1 to 1
    y[i] = x[i]*x[i]; // let's plot a quadratic function
  }
  // create graph and assign data to it:
  customPlot-&gt;addGraph();
  customPlot-&gt;graph(0)-&gt;setData(x, y);
  // give the axes some labels:
  customPlot-&gt;xAxis-&gt;setLabel("x");
  customPlot-&gt;yAxis-&gt;setLabel("y");
  // set axes ranges, so we see all data:
  customPlot-&gt;xAxis-&gt;setRange(-1, 1);
  customPlot-&gt;yAxis-&gt;setRange(0, 1);
  customPlot-&gt;replot();`enter code here`
  
  }
  </code></pre>
  
  <p>QcustomPlot code files were added to location: D:\userdata\userXYZ\My Documents\Visual Studio 2012\Projects, that's why I #include "../../qcustomplot.h"<br>
  Code was compiled with warning C4700: uninitialized local variable 'customPlot' used.</p>
  
  <p>When I run application it stop working after 1 second. </p>
  
  <p>Could someone please help with finding what is not correctly set, oh how code should look like? Maybe I missed some setting in VS?</p>
  
  <p>Thanks!</p>