On 7/25/07, tulip_rasputin <[EMAIL PROTECTED]> wrote:
>
>   Hi,
>
> I have a function, foo(), defined in a file a.c which defines and
> uses a variable named xxx. Now i have another function, bar(),
> defined in some other file, b.c, which also uses a static variable
> named xxx. Now foo() calls bar() and both manupilate xxx. Can
> something go wrong here?
>
> The two functions foo() and bar() go something like this:
>
> func foo() /* defined in a.c */
> {
> int xxx = 0;
>
> bar(&xxx);
>
> /* Some more processing is done on xxx */
>
> printf ("%d\n", xxx)
> }
>
> bar (int *yyy) /* defined in b.c */
> {
> int z = xxx; /* xxx is a static variable defined in the file b.c */
>
> /* Do some Processing on z */
>
> *yyy = z;
> }
>
> Any help in this regard would be really appreciated.
>
> Thanks,
> Tulip
>
>  
>

you are repeating the same question with different subject lines


-- 
Regards
Sumit Chawla ("eNetra : Hail the Invention")


"Computers are useless. They can only give you answers.":Pablo Picasso


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

Reply via email to