Check array size


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Check array size

  1. #1
    Join Date
    Mar 2005
    Posts
    5

    Unhappy Check array size

    Hi all

    Total newbie . Is there an easy way to check if a vector (set) can be checked to see if it is full of elements. I know that vector can grow. But i created it with a set size. I am currently trying to do it with if an for statements but with no luck.

    Any Help

    Cheers

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560

    It isn't a fixed size.

    The first parameter in the vectors constructor is the 'initial capacity'. Using
    that parameter doesn't stop the vector from allocating new memory space
    as it grows. I'm not sure what happends if you try supplying the
    capacityIncrement too, as a zero value. But then on the other hand, - what
    would I do with that knowledge ? When it comes to vectors, the size()
    method says it all....
    eschew obfuscation

  3. #3
    Join Date
    Mar 2005
    Posts
    5
    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center