Results 1 to 3 of 3

Thread: Getting the length of an array

  1. #1
    ChimpFace9000
    Guest

    Post

    This is my array...

    Code:
    char	*Constants[] = {"WM_COMMAND", "WM_INITDIALOG"};
    How do i find out how many different strings are in the array?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Maybe something like:
    Code:
    sizeof(Constants) / sizeof(char*)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    ChimpFace9000
    Guest
    Thanks.

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