[ create a new paste ] login | about

Link: http://codepad.org/Hj61INei    [ raw code | output | fork ]

C, pasted on Apr 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void main()
{
   struct timeval tvTime;
   struct tm tmOutput;

   gettimeofday(&tvTime, 0);
   localtime_r(&(tvTime.tv_sec), &tmOutput);

   tmOutput.tm_mon += 1;
   printf("password for today is: %x%02d-%02x%02d\n\n",
       tmOutput.tm_mon, tmOutput.tm_mon, tmOutput.tm_mday,
       gcd(tmOutput.tm_mon, tmOutput.tm_mday));
}

int gcd(int a, int b)
{
   return (b?gcd(b,a%b):a);
}


Output:
1
2
3
4
In function 'main':
Line 5: error: storage size of 'tvTime' isn't known
Line 6: error: storage size of 'tmOutput' isn't known
Line 4: warning: return type of 'main' is not 'int'


Create a new paste based on this one


Comments: