// main.cpp
QApplication a(argc, argv);
Card_Creater w;
mfp_set_card_creator(&w);
// mf.cpp
Card_Creater *m_cardCreator;
QApplication a(argc, argv);
Card_Creater w;
mfp_set_card_creator(&w);
// mf.cpp
Card_Creater *m_cardCreator;
mfp_set_card_creator(Card_Creater *p)
{
m_cardCreator = p;
}
Then we call from main.cpp within function to mf.cpp