07/11/17 20:32:34
>>203
やりたいのはこういうことじゃないか?
静的な仮想関数なんてわけのわからないものは必要ない
class A{ public: virtual void test1(){ cout << "A" << endl; }};
class B{ public: virtual void test1(){ cout << "B" << endl; }};
class C{ public: virtual void test1(){ cout << "C" << endl; }};
void thread_main(void *p){
static_cast<A*>(p)->test1();
}
int main(int argc, char **argv){
B *bbb = new B();
C *ccc = new C();
_beginthreadex(NULL, 0, thread_main, bbb, 0, NULL);
_beginthreadex(NULL, 0, thread_main, ccc, 0, NULL);
....
}