[QUOTE=Dman01;1720287]Codewise this mean you just open a File using std::ifstream::trunc

[CODE]
std::ifstream File;
std::string filepath = "text.txt";

File.open(filepath.c_str(), std::ifstream::out | std::ifstream::trunc );
if (!File.is_open() || File.fail())
{
File.close();
printf("\nError : failed to erase file content !");
}
File.close();
[/CODE][/QUOTE]

Thanks For Sharing but i have doubt its working properly or Error in If condition.