DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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

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
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links