What is the procedure you are using to link the files?

Ajinkya.


----- Original Message ----
From: andrew clarke <[EMAIL PROTECTED]>
To: [email protected]
Sent: Saturday, 31 March, 2007 7:43:48 AM
Subject: Re: [c-prog] Prob in same name f(); in c

On Sat, Mar 31, 2007 at 02:07:58PM +0530, Ravi Mishra wrote:

> I have a one query. I have two different files and in that files lot
> of functions are same name. when i m compiling that files and try to
> link their object files that function creates redeclaretion error.
> 
> Can any body suggest me some logic.

You can declare the functions "static", eg.

file1.c:

static int f(void)
{
return 42;
}

file2.c:

static int f(void)
{
return 69;
}




                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

[Non-text portions of this message have been removed]

Reply via email to