hello ,
after learning on functions in c++ , i created several functions and now i wanna create a gourp which will have these several functions at a place(i think its done with header file).
so, i think if i create a header file and include these all these functions there then it will be easier.But i don't know how to create a header file which includes several functions.
the only thing i know about header files is that "they have .h
file extention and they include various constants
and functions
".
here is for what i wanna create header file :
int factorial(int n)
{
if(n==0)
return 1;
else
return n*factorial(n-1);
}
Bool IsEven(int n)
{
if (n%2==0)
return true;
else
return false;
}
double sqr(int n)
{
return n*n;
}
and now how can i create the file and how can i add this file to my programe.
please guide me.
thanks in advance :)