compilation problem

i have a class name 1.c in tht i am using function n wich has his body in 2.c and declaration in 2.h
now how can i compile 1.c.
ex;
1.c
int main()
{
//some data
n(10);
//somedata
}
*****
2.c
int n(int k)
{
//some data

}
int main()
{
some data
}
*****
2.h
int n(int k);

i complied the progam using command as : cc 1.c -o 1 -lm
i got the error as;
1.c.text+0xd5): undefined reference to `n'.
thank u,
sree

You could do: cc 1.c 2.c -o 1 -lm, but you'll run into trouble as the two source file have both main() which should be unique in your executable 1 ...

Don't get in the habit of using C++ comments in C code.