I am doin the 13.3 program in Programming in C by Stephen G. Kochran. I put out the program like it supposed to.
Code:
/* Program to illustrate the use of the #include statement
Note: This program assumes that definitions are
set up in a file called metric.h */
#include <stdio.h>
#include "metric.h"
int main (void)
{
float liters, gallons;
printf ("*** Liters to gallons ***\n\n");
printf ("Enter the number of liters: ");
scanf ("%f", &liters);
gallons = liters * QUARTS_PER_LITER / 4.0;
printf ("%g liters = %g gallons\n", liters, gallons);
return 0;
}
and I gettting the errors:
1>------ Build started: Project: Program 13.3, Configuration: Debug Win32 ------
1>Compiling...
1>13-3.c
1>f:\c programming\program 13.3\program 13.3\13-3.c(6) : fatal error C1083: Cannot open include file: 'metric.h': No such file or directory
1>Build log was saved at "file://f:\C Programming\Program 13.3\Program 13.3\Debug\BuildLog.htm"
1>Program 13.3 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have Microsoft Visual C++ 2008 compiler, how come it doesn't know what #include "metric.h" is?