去头去尾
void remove_space(string& str){
string buff(str);char space = ' ';
str.assign(buff.begin() + buff.find_first_not_of(space),
buff.begin() + buff.find_last_not_of(space) + 1);
}
把一个char a[20]清零,一定是 memset(a,0,20*sizeof(char));
http://baike.baidu.com/link?url=OPwRpCjTVRbH1d-4iS5L45F98j-uUmbXkfK4g9KlpbJW7_ddakP40UMcJ39ObOw6fc9U9__PVwIeQJWWAsxFWK