Hi Mohsen > My main file: > int main(){ > module_management *x; > x.printg(); > } In your code, x is a wild pointer. You need to do either: int main() { module_management x; x.printg(); } Or: int main() { module_management* x = new module_management; x->printg(); delete x; } (You can replace new module_management with some other suitable factory function that you have written.) HTH, --Eljay