I got the book "C for Dummies volume II". printed in 1997. I'm using the djgpp compiler.
It seems that djgpp doesn't recognize the 'strcmpi' function though it recognize 'strcmp'.
Also while doing a small metric program that converts miles to kilometers, I get this:
Code:
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
C:\Documents and Settings\Bob L Woods>cd c:\djgpp
C:\DJGPP>cd mystuff
C:\DJGPP\Mystuff>gcc metric.c -o metric
Cannot load VDM IPX/SPX support
metric.c:14:9: warning: unknown escape sequence: '\040'
metric.c: In function 'main':
metric.c:5: warning: return type of 'main' is not 'int'
C:\DJGPP\Mystuff>metric
Enter a value in miles:18
0.00 miles work out to 0.00 kilometers
C:\DJGPP\Mystuff>
Here is the source code:
Code:
void main()
{
char input[20];
double miles,kilometers;
printf("Enter a value in miles:");
miles=atof(gets(input));
kilometers=miles*1.609;
printf("%.2f miles work out to\ %.2f kilometers",miles,kilometers);
}
Can anyone tell me if its something I'm doing wrong or if perhaps my copy of DJGPP is missing files or corrupted?