Skip to content

Instantly share code, notes, and snippets.

@rane-hs
Created July 20, 2011 06:39
Show Gist options
  • Save rane-hs/1094464 to your computer and use it in GitHub Desktop.
Save rane-hs/1094464 to your computer and use it in GitHub Desktop.
//某社の某cpp
#include <string>
#include <vector>
typedef struct
{
std::string str_;
time_t tim_;
}foo_t;
int FooFunc(void *lhs, void *rhs){
//snip
}
void func()
{
std::vector<foo_t> fooList;
//snip
qsort(fooList.begin(), fooList.size(), sizeof(foo_t), FooFunc);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment