Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C - <b>classes data and function storage classes</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Classes                  Data and Function Storage Classes

    An object's class determines its lifetime and scope.  C allows
    objects to be allocated space permanently (conceptually at compile-
    time), or dynamically, at run-time.  Therefore, an object's lifetime
    may be temporary or permanent.  The area of a program over which an
    object is visible is termed its scope.  The various scopes are block,
    function and source file.  Scope and life is determined by a
    combination of class keywords and whether the placement of a
    declaration is inside a function definition or outside.

      Notes:    If a variable's declaration is outside a function and it
                has no class specifier, it is an external definition, and
                as such, may have an initializer list that can be
                evaluated at compile-time. This variable can be accessed
                from other source code files by using the extern class in
                those files. If the declaration is inside a function and
                it has no class specifier, auto class is assumed.

                Unless a function is declared to have class static, it
                has class extern.


See Also: auto register static extern

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson