CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    47

    This is easy but I need help.

    I am reviewing an MFC program and one of the functions has this struct in it:

    static struct STYLES styles[] = {
    PS_SOLID, "PS_SOLID",
    PS_DASH, "PS_DASH",
    PS_DOT, "PS_DOT",
    (then it has some more etc....)
    };

    I understand the PS's and text but the whole "styles[]" has me at a loss.
    Any help is greatly appreciated.






  2. #2
    Join Date
    May 1999
    Location
    Antwerp, Belgium
    Posts
    136

    Re: This is easy but I need help.

    It declares a variable length array of the struct STYLES. The initialisation adds 3 elements to it.


  3. #3
    Join Date
    Apr 1999
    Location
    Monterrey, Mexico
    Posts
    21

    Re: This is easy but I need help.

    that only means that the styles array will have as many members as you initialize. In your example it means styles has a size of 3.

    adiós!


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

Featured