Uhm. I suddenly realize my code might be a tad too much. I didn't know where you stood from reading the first post.
Start with this:
Code:
#include <iostream>
#include <ctime>
using namespace std;
int main(int argc, char* argv[])
{
clock_t start, end;
long double duration;
start=clock();
//TODO: code to test here.
end=clock();
duration=(long double)(end-start)/CLOCKS_PER_SEC;
cout<<"Elapsed time: "<<duration<<endl;
return 0;
}