You had a couple of problems. The big one is that you were trying to use switch as a member of the vector example. I tested this on bcc55 as well as mingw (testing it on bcc55 was an afterthought). This follows the standard better than what you had.
Code:
#include <iostream>
#include <vector>
using std::vector;
using std::cin;
using std::cout;
using std::swap;
int main()
{
vector <int> example; //Vector to store integers
example.push_back(3); //Add 3 onto the vector
example.push_back(10); //Add 10 to the end
example.push_back(33); //Add 33 to the end
for(int x=0; x<example.size(); x++)
cout<<example[x]<<" "; //Should output: 3 10 33
if(!example.empty()) //Checks if empty
example.clear(); //Clears vector
vector <int> another_vector; //Creates another vector to store integers
another_vector.push_back(10); //Adds to end of vector
example.push_back(10); //Same
if(example==another_vector) //To show testing equality
example.push_back(20);
// this is wrong!!! switch is actually a statement!
// example.switch(1, 2); //Switches elements 1 and 2
swap(example[1], example[2]);
for(int y=0; y<example.size(); y++)
cout<<example[y]<<" "; //Should output 20 10
cin.get();
return 0;
}