At 8/13/2002 5:15 PM, Morbus Iff wrote:
> Not having any clue what I'm doing (I know no C), I copied and pasted the
> code with vi, named the file "test.c", ran the command in the email, and go
> the following:
>
> [disobey:~/Desktop] morbus% cc -o test test.c
> test.c: In function `main':
> test.c:6: warning: return type of `main' is not `int'
Testing on a RedHat Linux machine, I received the same error. After
replacing "void main()" with "int main()" and adding "return 0;" as the last
statement in the function body, everything compiled and ran fine. Maybe the
same will work for you.
Cheers,
David
> Repeating said lack of clueness, I don't know what to do next:
>
> 1 #include <sys/types.h>
> 2 #include <stdio.h>
> 3 #include <time.h>
> 4
> 5 void main()
> 6 {
> 7 int strsize = 255;
> 8 time_t timeAsNumber;
> 9 struct tm *temp;
> 10 char str[256];