undefined reference to `WinMain@16'

Hello again, so I decided I would work on my calculator more, and make it able to multiply. so far, its doing pretty well. Onlything I'm not to sure about is making a menu (So I can select if I want to add, divide, multiply, or subtract)
I'm no longer getting this error undefined reference to `WinMain@16'

but I would love if someone could help me with the menu. :)


Here's my code.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>

using namespace std;

int multiply (int d, int e)
{
    return (d*e);
}

int add (int a, int b)
{
    return (a+b);
    }

int main1 ()
{
    int a, b, c;
    cout << "enter two numbers to add: ";
    cin >> a;
    cin >> b;
    c=add (a,b);
    cout << a << "+" << b << "=" <<c;
    return 0;
}
int main2 ()
{
    int d, e, f;
    cout <<"enter two numbers to multiply: ";
    cin >> d;
    cin >> e;
    f=multiply (d,e) ;
    cout << d << "x" << e << "=" <<f;
    return 0;
}


Thanks for all your help guys!
Last edited on
Topic archived. No new replies allowed.