My solution is slightly different to any of those above and works as I just ran it.So for interest:
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
char *name[] = {"john", "bobby", "dear", "test1", "catherine", "nomi", "shinta", "martin", "abe", "may", "zeno", "zack", "angeal", "gabby"};
vector<string> v(name, name + 14);
sort(v.begin(),v.end());
for(vector<string>::const_iterator i = v.begin(); i != v.end(); ++i) cout << *i << ' ';
return 0;
}