#include
Using namespace std;
/ *
* Assistant Function,
* Return A String, Get Tow String &,
* Use to change a filename's extern name;
* Author: lonelyforest
* Date: 2006.03.15
* /
String change_file_ext (const string & filename, const string& new_ext)
{
INT Dot_POS = 0;
String Temp = filename;
For (int i = 0; i
{
IF (Temp [i] == '.')
{
Dot_pos = i;
}
}
TEMP.ERASE (DOT_POS);
TEMP = new_ext;
Return Temp;
}
Not very good, I hope to advise.