dofun() is currently declared as a private member function, meaning you can't call it directly. It needs tocan only be called oninternally by an instance of the AllTimer class.
It looks like you probably want to declare it as a public static function instead, meaning you don't need an instance of the class. To do that, modifyremove the private specifier from the class declaration in, and put static before the function declaration. Your header file toshould look something like this:
class AllTimer
{
public:
AllTimer();
void setTimer(void);
static void dofun(void);
};
You will then need to change the ISR to include the class name in the call:
ISR (TIMER1_OVF_vect)
{
AllTimer::dofun();
}