Thread: OOP and global arrays

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User dan20n's Avatar
    Join Date
    Jan 2005
    Posts
    24

    OOP and global arrays

    here is a mock up of what i have:

    Code:
    struct blah {
    // some stuff
    };
    
    blah array[100];
    
    ...
    // functions..
    ...
    this is in a seperate file to the main, [edit] i think [/edit] the compiler asks me to place this decleration inside a function i need it to be global, any ideas? its late where i am so if u need more info or the actual code then ask. Cheers

    Code:
    28 C:\ass1.cpp variable-size type declared outside of any function
    hope this helps
    Last edited by dan20n; 02-24-2005 at 04:40 AM.
    Meg: Everybody! Guess what I am?
    Stewie: Hm, the end result of a drunken back-seat grope-fest and a broken prophylactic?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP question (global variable?)
    By VikingBow in forum C# Programming
    Replies: 5
    Last Post: 12-26-2007, 05:48 PM
  2. Global objects and exceptions
    By drrngrvy in forum C++ Programming
    Replies: 1
    Last Post: 09-29-2006, 07:37 AM
  3. OOP for DirectPlay Peer to Peer program
    By curlious in forum Networking/Device Communication
    Replies: 0
    Last Post: 11-04-2003, 12:21 AM
  4. Avoiding Global Variables in games, how?
    By Unregistered in forum Game Programming
    Replies: 5
    Last Post: 03-24-2002, 07:33 AM