Example #1
0
void testValues(IntVector& test)
{
	cout << "Size: " << test.size() << endl;
	cout << "Capacity: " << test.capacity() << endl;
	cout << "Array: " << endl;
	
	//display array if vector is NOT empty
	if (!test.empty())
	{
		for (int i = 0; i < test.size(); i++)
		{
			cout << "#" << i << ": " << test.at(i);
			cout << endl;
		}
	}
	else
	{
		cout << "Vector is empty!" << endl;
	}
	cout << endl;
}