char lpszstr[3][15] = { "abd", "a0c", "abcd" };
//#pragma pack( push )
//#pragma pack( 1 )
struct foo {
char s[sizeof(*lpszstr) / sizeof(**lpszstr)];
bool operator<(const foo& rhs) const {
return strcmp(s, rhs.s)<0;
}
};
//#pragma pack( pop )
std::sort((foo*)(lpszstr + 0), (foo*)(lpszstr + sizeof(lpszstr) / sizeof(*lpszstr)));
puts(lpszstr[0]);
puts(lpszstr[1]);
puts(lpszstr[2]);