Thread: Externs, includes, protection OH MY

  1. #1

    Externs, includes, protection OH MY

    I have about eight files in my dev project. All of the headers are inclusionally protected, and i have included all of the necessary files. the problem still remains that i can't access variables and functions named in other headers. NOthing i can do has made my functions and headers see eachother. for instance, i can;t get void initScenario to be able to call initRooms (declared in rooms.h). In initRooms, i can't get it to see world[16][16] whoch is declared in scenario.h (where initScenario is)

    Help!

    ~Inquirer
    Compilers:
    GCC on Red Hat 8.1 (Primary)
    GCC on Mac OS X 10.2.4 (Secondary)

    Others:
    MinGW on XP

  2. #2
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    did you do

    #include "rooms.h"

    for the file you need to have access to rooms.h ?

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    ... and is the error at compile or link time?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    hammer how do u make the code thingies show up?

    [ code ] /* is this workign? */ [ /code ]
    Last edited by red_baron; 10-06-2002 at 06:00 PM.
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  5. #5
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    yay it worked, though it doesn't look like yours
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  6. #6
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Hammer might be able to have it show up like that, because he is using it in his sig and not in an actual post.

  7. #7
    Registered User JoshG's Avatar
    Join Date
    Mar 2002
    Posts
    326
    Umm, did you link all the object files together?

  8. #8
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Originally posted by TechWins
    Hammer might be able to have it show up like that, because he is using it in his sig and not in an actual post.
    There are special character codes (like /&%#69, not sure of the exact syntax though... ) that allows you to print characters like [ and ], without the tags to take effect.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  9. #9
    Christian
    Join Date
    Mar 2002
    Posts
    612
    hammer does it like this

    [code] lookey [/code]

    now to do it, remove the spaces:

    [c [ i ][ / i ] o d e ]

    tags.
    I shall call egypt the harmless dragon

    -Isaiah 30.7

  10. #10
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    [code]
    //Insert code here
    [/code]

    ...amazing!

  11. #11
    Registered User JoshG's Avatar
    Join Date
    Mar 2002
    Posts
    326
    True programmer innovation

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile and includes
    By Lang in forum C Programming
    Replies: 4
    Last Post: 03-18-2008, 03:29 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Why are using declarations passed over but not includes
    By indigo0086 in forum C++ Programming
    Replies: 7
    Last Post: 12-18-2006, 11:54 AM
  4. A general protection exception failure
    By louis_mine in forum C Programming
    Replies: 7
    Last Post: 11-25-2004, 02:22 AM
  5. General Protection Exception
    By s9uare in forum C++ Programming
    Replies: 1
    Last Post: 11-02-2002, 10:46 AM