Thread: question about declaring global variables

  1. #1
    Registered User
    Join Date
    Feb 2005
    Location
    oslo
    Posts
    26

    question about declaring global variables

    I remember reading somewhere on this forum(I think) that says declaring global variables outside/before the main function is bad.
    why is that?

    Dag
    life is too short smart but hard !

  2. #2
    Registered User Micko's Avatar
    Join Date
    Nov 2003
    Posts
    715
    For start, read this!
    Gotta love the "please fix this for me, but I'm not going to tell you which functions we're allowed to use" posts.
    It's like teaching people to walk by first breaking their legs - muppet teachers! - Salem

  3. #3
    Registered User
    Join Date
    Feb 2005
    Location
    oslo
    Posts
    26
    Ok thanks
    life is too short smart but hard !

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Use global variables or pointers?
    By RealityFusion in forum C++ Programming
    Replies: 5
    Last Post: 09-22-2005, 08:47 PM
  2. Global Variables, include files and classes
    By sharpstones in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2005, 10:06 AM
  3. Replies: 1
    Last Post: 09-05-2004, 06:42 PM
  4. Global variables.. how bad?
    By punkrockguy318 in forum C++ Programming
    Replies: 19
    Last Post: 11-30-2003, 10:53 PM
  5. global variable and header question
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 08-05-2002, 11:38 PM