-5

Heres my code

//numbersandshit
#include <iostream>
using namespace std;
int name()
{
    int numb, sqnumb;

    for(numb=4; numb<=9; numb=numb+1)
    {   sqnumb=numb*numb;

        cout<<numb<<" "<<sqnumb<<endl;
    }
    return 0;
}

and at the end I keep undefined reference to '_Winmain@16'

2 Answers2

0

Your program needs to provide a main() function because it's called by your system to start the program. Rename name() to main().

David G
  • 94,763
  • 41
  • 167
  • 253
0

You need to define a main function.

int main()

Or

int main(int argc, char* argv[])

Since you're not using command line arguments, just rename name to main.

Blob
  • 561
  • 1
  • 6
  • 19