获取文件名后缀

//获取文件名后缀
char* fileName = "pwave.sgy";
std::string file_str = fileName;
int pos = file_str.rfind('.') + 1;
std::string temp = file_str.substr( pos );

 

posted @ 2014-09-11 16:31  想什么想  阅读(115)  评论(0编辑  收藏  举报