Java Programming
C Programming
C++ Programming

How can you implement a Class in C?

171819

Answer

User Avatar
Wiki User
08/28/2009

struct SClass{

int iNumber;

int (*fpgetValue)();

int (*fpsetValue)();

}Sc;

int m_Func(){

printf("\n\n Hello How are you doing,i called by function pointer");

getchar();

return 1;

}

int _tmain(int argc, _TCHAR* argv[])

{

Sc.fpgetValue=m_Func;

Sc.fpgetValue();

return 0;

}