2004年2月25日

C++ programming techniques

There is a usual saying that you should spend two years' full time to master the C++ language. And I only have learned C++ for one month full time. So my C++ techniques are few.

Tonight, I write my first class in C++ under the help of Shanglin.
He teaches me to use the input stream to input words separated by space.
The best idea for me is that I can define one or more interface functions to relize the inner information hidding mechanism. And there are as lest as public functions to be used for other users. I can realize my purpose by private functions. And then put some private functions in the public functions. If later I must or will change the inner relizing algorithm, I can change the private functions without any consideration for the public functions and the public interface.

And another good about class of c++ is that others can transfer your class to realize their purpose by including the .h file.

Good.

Right now I understand the truth that we can study fast by practising by ourselves.

没有评论: