title: Import NetBeans C++ project to Visual Studio 2010
body: <p>Can you help me with these errors in Visual C++ please? I am new in C++ and I imported this code (design pattern Factory) from NetBeans. In NetBeans this code is correct. But now I need compile this code in Microsoft Visual Studio 2010 and I it is generating these errors:</p>
  
  <p>Creator.h</p>
  
  <pre><code>#pragma once
  
  #include "stdafx.h"
  
  
  class Creator
  {
       public:
       Product* createObject(int month);
       private:
  };
  </code></pre>
  
  <p>Errors:</p>
  
  <ul>
  <li>error C2143: syntax error : missing ';' before '<em>' on line - Product</em> createObject(int month)   </li>
  <li>error C4430: missing type specifier - int assumed. Note: C++ does not support default-int on line - Product* createObject(int month);</li>
  </ul>
  
  <p>Creator.cpp</p>
  
  <pre><code>#include "stdafx.h"
  
  Product* Creator::createObject(int month) {
      if (month &gt;= 5 &amp;&amp; month &lt;= 9) {
          ProductA p1;
          return &amp;p1;
      } else {
          ProductB p2;
          return &amp;p2;
      }
  }
  </code></pre>
  
  <p>Errors:</p>
  
  <p>IntelliSense: declaration is incompatible with " <em>Creator::createObject(int mesic)" (declared at line 9 - this is: Product</em> createObject(int month);)</p>
  
  <p>stdafx.h:</p>
  
  <pre><code>#pragma once
  
  #include "targetver.h"
  
  #include &lt;stdio.h&gt;
  #include &lt;tchar.h&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  #include "Creator.h"
  #include "Product.h"
  #include "ProductA.h"
  #include "ProductB.h"
  </code></pre>
  
  <p>Product.h:</p>
  
  <pre><code>#pragma once
  #include "stdafx.h"
  
  class Product
  {
   public:
  virtual string zemePuvodu() = 0;
  Product(void);
  ~Product(void);
  };
  </code></pre>
  
  <p>Product.cpp:</p>
  
  <p>It has only:</p>
  
  <pre><code>#include "stdafx.h"
  
  Product::Product(void)
  {
  }
  
  
  Product::~Product(void)
  {
  }
  </code></pre>
  
  <p>Thank you for answer. </p>