devxlogo

December 18, 1998

Checking a Vector’s Capacity

The member function capacity() returns the total number of elements that a vector can hold without requiring reallocation: #include #include using namespace std;void main() { vector vi; vi.reserve(10); //make room

Detecting Alphanumeric Characters in a String

Java provides a convenient function for detecting whether a character is alphanumeric (1-26 and 0-9) or not. This function is available in the class Character. Some of the other related