Thread: all are extern or not ?

  1. #1
    flashing vampire black's Avatar
    Join Date
    May 2002
    Posts
    563

    Question all are extern or not ?

    Howdy,everyone.

    my book told me that all functions are extern by default. and what about variables and consts ?

    Regards~
    Never end on learning~

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Functions declared outside a class are global by default, which means that functions in other files can use that function. Declared variables and consts outside classes and functions are also global by default. Which means that functions in other files can use them.

  3. #3
    flashing vampire black's Avatar
    Join Date
    May 2002
    Posts
    563
    Originally posted by Shiro
    Functions declared outside a class are global by default, which means that functions in other files can use that function. Declared variables and consts outside classes and functions are also global by default. Which means that functions in other files can use them.
    I got it. thanx,Shiro~
    Never end on learning~

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. extern classes
    By Swordsman in forum C++ Programming
    Replies: 1
    Last Post: 05-07-2008, 02:07 AM
  2. Replies: 16
    Last Post: 10-29-2006, 05:04 AM
  3. Odd Problem with Linking
    By jamez05 in forum C++ Programming
    Replies: 6
    Last Post: 09-21-2005, 01:49 PM
  4. Extern Question, really confused
    By SourceCode in forum C Programming
    Replies: 10
    Last Post: 03-26-2003, 11:11 PM
  5. extern symbols, what do these mean exactly?
    By Shadow12345 in forum C++ Programming
    Replies: 8
    Last Post: 11-02-2002, 03:14 PM