#include "stdafx.h"
#include <iostream>
struct BaseStatic{
static void show(){std::cout<<"BaseStatic::show"<<std::endl;};
};
struct DerivedStatic1:public BaseStatic{
};
struct DerivedStatic2:public BaseStatic{
static void show();
};
void DerivedStatic2::show(){std::cout<<"DerivedStatic2::show"<<std::endl;};
void test_static()
{
DerivedStatic1::show();
DerivedStatic2::show();
DerivedStatic2::BaseStatic::show();
}
#include <iostream>
struct BaseStatic{
static void show(){std::cout<<"BaseStatic::show"<<std::endl;};
};
struct DerivedStatic1:public BaseStatic{
};
struct DerivedStatic2:public BaseStatic{
static void show();
};
void DerivedStatic2::show(){std::cout<<"DerivedStatic2::show"<<std::endl;};
void test_static()
{
DerivedStatic1::show();
DerivedStatic2::show();
DerivedStatic2::BaseStatic::show();
}