Hi can we hide variables in a structure from outside of the given file using static keyword???
similarly can we hide a global variable from outside of the given file using static keyword?
if so please let me know how.
Thanks in advance…
Hi can we hide variables in a structure from outside of the given file
Share
Use an opaque data type, where the type is declared in a header, but the struct is defined in the implementation. This means any code which includes the header can pass pointers around to the type, but only the implementation can modify and process data contained by the struct.
The typical example is
FILEfromstdio.h.For more information see http://en.wikipedia.org/wiki/Opaque_pointer