I have a really simple shell of of a program. The editor i use is Scite and my compiler is MingW.
The answer to this is that I'm missing a main but i do have a main().
Main.cpp
#include
#include "Money.h"
using namespace std;
int main()
{
}
Money.cpp
#include "Money.h"
#include
using namespace std;
Money::Money()
{
cout << "test"
}
Money.h
#ifndef MONEY_H
#define MONEY_H
class Money
{
public:
Money();
private:
};
#endif //MONEY_H
Everytime I try to compile Money.cpp it gives me the error
libmingw32.a(main.o):(.text.startup+0xa7): undefined reference to `WinMain@16'
And I'm not sure what's wrong with the program. All the files are in the same directory. I'm fairly new to programming in C++ so if you can give me a very basic answer or fix it be greatly appreciated.
No comments:
Post a Comment