Define pointer as Global variable

Hi
I have to use some functions from some libraries and there functions does not allow to pass my structure to those.So I want to use global variable.
Can I define pointer as global variable and in "main" section, assign allocate memory for that by malloc ??
what are drawbacks of global variable ?

Thanks in advance
Why do you need anything global at all? What do these functions ask for?
We would like to see some code, like Your structure and the Function you are trying to call.
Take a look at this, it explain the singleton pattern:
http://www.infernodevelopment.com/singleton-c
Thanks.
I tried and it's ok.
Topic archived. No new replies allowed.