int main ()

I have this question how would find the headers for the five functions that are below without supplying the blocks for them, i dont quite understand it

{

int x, c;

double r;

x = readData ();

for (c = 0; c < 5; c++)

printValues (x, r + 1);

x = adjust (x + 2);

r = max3 (x, c, 10);

return fun (x + c, x - c);

}

The documentation of the functions themselves. Where did you hear about them?

The functions you use, like readdata() and printvalues() are in another translation unit (fancy name for source file or library). Normally you include the necessary headers where the functions are declared, and link the program with the object file or library that contains the implementation of the function. Something like this:

#include <stdlib.h>
#include <someheader.h>

int main(void)
{
   // Calling functions declared in someheader.h
   somefunction();
   otherfunction();
   return 0;
}

Now, when you like the executable, you either need to link the object file, such as somefunctions.o (somefunctions.obj for Windows), or the library that contains them, such as libsomefunctions.so (libsomefunctions.dll for Windows).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.