[Eug-lug] late night thoughts on a fragment in C

Fred James fredjame at fredjame.cnc.net
Sat Sep 8 13:08:47 PDT 2007


larry price wrote:

>#include <math.h>
>#include <stdio.h>
>main()
>   {
>   int i=5;
>   for(;i;) printf("%c ",(int)(81+7.3*sin(i---5.75)));
>}
>
>certain aspects of computing are fundamentally arbitrary,
>
>http://pastebin.com/f1b9fa8dc
>
>  
>
Larry Price
I may be missing something ... compiling the above (gcc C.c -o C) 
resulted in ...
~/tmp/ccKXlIHx.o: In function `main':
C.c:(.text+0x2d): undefined reference to `sin'
collect2: ld returned 1 exit status

Could this be a C++ thing? (I followed the link provided and the comment 
style is C++).
Regards
Fred James

Mandriva 2007
gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)





More information about the EUGLUG mailing list