c++ get extension
#include <iostream>
#include <string>
using namespace std;
string GetFileExtension(string Filename)
{
size_t LastDot = Filename.find_last_of(".");
if (LastDot == string::npos)
{
return ""; // No extension in Filename string
}
return Filename.substr(LastDot);
}