hackyk said:
Hey I would like to know how i cud write classes that would implement
its own methods so wen i us them I do not have to write the code in the
main program.
Step one: buy a good C++ book or three (cf.
http://www.parashift.com/c++-faq-lite/how-to-learn-cpp.html#faq-28.4).
I'd recommend _Accelerated C++_ by Koenig and Moo, which teaches C++
the right way from the ground up.
Step two: read it and do the exercises.
By then, your question (and a whole lot more) will be answered. If you
can't afford that book and your library doesn't have it, read Bruce
Eckel's _Thinking in C++_, which is another good book that is available
online for free (google for it), or google for a tutorial on C++
basics.
Cheers! --M