Results 1 to 6 of 6

Thread: structure's variables cant be seen when using static?

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    structure's variables cant be seen when using static?

    cant they?

    i seem only to can see them when trying to use the structure if i create an instance of the struct...cant i do this without instanciating it?

  2. #2

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    problem solved

    PHP Code:
            static private struct RGB
            
    {
                static public 
    int red;
                static public 
    int green;
                static public 
    int blue;
            } 
    i figured i had to put static in the vars too

  3. #3
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    You are not required to create an instance of a structure using the 'New' keyword. However, if you do not, all the data members will be uninitialized.

  4. #4

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    whatever

  5. #5
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    You shouldn't have to make the structure static, just the variables.
    -scott
    he he he

  6. #6

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    yea lol that's what i did

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width