ent_for_name is just what you're looking for. It returns the WED name of an entity in the form of a string.

Unless you want to return the filename. In that case, use str_for_entfile.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}