Results 1 to 2 of 2

Thread: Elements number of a estructures array

  1. #1
    Join Date
    Jun 2018
    Posts
    31
    Thanks
    8
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Elements number of a estructures array

    How can I get the elements number of a estructures array?
    I have used sizeof (nameStruct), but it gives an incorrect value of elements.
    Thanks for help

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Elements number of a estructures array

    If you use a vector instead of an array, you can simply query its size.

    Cheers,
    _

Similar Threads

  1. Replies: 8
    Last Post: 9th January 2015, 20:08
  2. Number of elements in a list of list
    By giorgik in forum General Programming
    Replies: 5
    Last Post: 18th July 2013, 08:36
  3. Replies: 1
    Last Post: 5th March 2012, 06:34
  4. Concatenate two array elements
    By b1 in forum General Programming
    Replies: 6
    Last Post: 29th October 2007, 20:43
  5. QSettings again ... how to remove array elements
    By Mike in forum Qt Programming
    Replies: 4
    Last Post: 11th January 2006, 08:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.