Re: global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



just declare the global variables as extern in other files
and use them.i.e declare them as     'extern int k;'
(int k or anything you would like to declare)
take care of double global varibles with same name
and don't initialise an extern variable where it was  declared.i.e (don't
use 'extern int k=0;')

warm regards
sandeep dey
----- Original Message -----
From: "paridhi bansal" <paridhibansal@yahoo.com>
To: <kernelnewbies@nl.linux.org>; <dharmenderr@cybage.com>
Sent: Saturday, November 23, 2002 1:20 AM
Subject: global variables


> Hi
>
> I have multiple c files in  my project. How is it
> possible to declare static global variables  that are
> accessible from all these files without passing them
> as arguements??
>
> Paridhi
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux