undefined reference to WinMain@16 C++

19.3k Views Asked by At

I'm learning in C++, and I've been watching tutorials on thenewboston.org. I'm trying to place classes in different files. When compiling in Codeblocks, I get the message, "undefined reference to WinMain@16". This is my code:

Burrito.cpp

  #include "Burrito.h"
  #include <iostream>

   using namespace std;

    Burrito::Burrito()
   {
    cout << "Im a burrito!"<< endl;
    }

Burrito.h

        #ifndef BURRITO_H
        #define BURRITO_H


        class Burrito
        {
        public:
        Burrito();

         };

         #endif // BURRITO_H

main.cpp

     #include <iostream>
     #include "Burrito.h"
     using namespace std;

     int main()
     {
         Burrito Obj1;
         return 0;
      }
  • All files are saved in the same directory
  • I'm using windows 8 x64
  • codeblocks latestversion
0

There are 0 best solutions below