Tutorial number 15

0 Segunfunmi Oyedele · June 24, 2015
I created a new class and did everything according to the instructions in the tutorial but whenever i try to build and run this function, it builds well but i get this error message: undefined reference to 'WinMain@16'

Please what does that mean because it is really making my lessons frustrating. I have been on this for several hours. Please someone help me out!!!

main.cpp

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

using namespace std;

int main()
{
    Banana ob;
    return 0;
}




Banana.h
#ifndef BANANA_H
#define BANANA_H


class Banana
{
    public:
        Banana();

};

#endif // BANANA_H



Banana.cpp
#include "Banana.h"
#include <iostream>

using namespace std;

Banana::Banana()
{
    cout << "Welcome" << endl;
}

Post a Reply

Replies

Oldest  Newest  Rating
0 mark uihlein · July 2, 2015
This is an older tutorial and there where newer options in CodeBlocks that i had to uncheck.. Watch the beginning again and make sure everything is the same when you create new class.  Pause the video if you have to so you can see which options are extra.
  • 1

C++

107,222 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator