hyderabadblues wrote:
I have a doubt regarding how to access global variables if already
there is one static variable with the same name defined at the
beginning of file outside any function.
E.g:
//File client.c
int iGlobalVar; // Global Variable
// main.c
static int iGlobalVar;
int main()
{
// How to access iGlobalVar here;
}
In main.c, rename `iGlobalVar` to `someDecentName`.
PS there should be a `client.h` header file containing the extern
declaration for `iGlobalVar`, which you #include into `client.c`
and `main.c`.
PPS I hope `iGlobalVar` has a decent name too.
--
Chris "iTarzan, uJane" Dollin
Hewlett-Packard Limited registered office: Cain Road, Bracknell,
registered no: 690597 England Berks RG12 1HN