title: undefined reference to WinMain@16 (codeblocks)
body: <p>When I compile my secrypt.cpp program, my compiler shows the error "<code>undefined reference to WinMain@16</code>".
  my code is as follows</p>
  
  <p>secrypt.h :</p>
  
  <pre><code>#ifndef SECRYPT_H
  #define SECRYPT_H
  
  void jRegister();
  
  #endif
  </code></pre>
  
  <p>secrypt.cpp :</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;string&gt;
  #include&lt;fstream&gt;
  #include&lt;cstdlib&gt;
  #include "secrypt.h"
  
  using namespace std;
  
  void jRegister()
  {
      ofstream outRegister( "useraccount.dat", ios::out );
      if ( !outRegister    ) {
      cerr &lt;&lt; "File could not be opened" &lt;&lt; endl;
      exit( 1 );}
      string a,b,c,d;
      cout&lt;&lt;"enter your username :";
      cin&gt;&gt;a;
      cout&lt;&lt;"enter your password :";
      cin&gt;&gt;b;
      outRegister&lt;&lt;a&lt;&lt;' '&lt;&lt;b&lt;&lt;endl;
      cout&lt;&lt;"your account has been created";
  
  }
  </code></pre>
  
  <p>trial.cpp</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include "secrypt.h"
  
  using namespace std;
  
  int main()
  {
      void jRegister();
  
      return 0;
  }
  </code></pre>
  
  <p>Here is the image of my error:
  <a href="https://www.dropbox.com/s/0rsns6hhxhzevml/Screenshot%202013-11-16%2021.13.57.png">errorimage</a></p>
  
  <p>When I compile my trial.cpp program, it compiles and opens the console, but didn't calls the function. Here is the image of the console screen of trial.cpp program .
  <a href="https://www.dropbox.com/s/ikocwnb732bp869/Screenshot%202013-11-16%2021.19.59.png?m=">o/p screen</a>
  Can anyone help me solving this?</p>