clock

hello i'm trying to make a digital clock. but when i compile i get this error:

[Link error] undefined reference to 'WinMain@16'
Id returned 1 exit status


here is my code:


#include <iostream>
#include <cmath>
#include <string>
#include <ctime>

using namespace std;


int min;
int sec;
string day_nite;

int time()

{
int min;
if (min = 60){min = 0;}
else{ int i; int j;

for(i=0;i<=60; i++);
i=min;
if (min = 60){
for (j=0; j<=60; j++)

{
cout << min << ":" << sec << endl;
}
}
}
}
Your project is set for windows application you need to change it to console application, in project settings.
Topic archived. No new replies allowed.