working on dynamic memory in class.Not stable yet
placed pointers in constructor
ready for testing on windows..