it has been a long time since i used c++ programme in the last year of undergraduate. today, i try to use it to implement data structure and then be messed by a bounch of problems.
i arrange my thinking and hope to write some recommendation for my C++ learning.
1. define the struct in a header file, but include the "#ifndef……#define……#endif".
2. the use of construct. typedef struct{}node, and then i can use node as a kind of struct
3. if i want to use the function of one a.cpp in another b.cpp, i do not need to write "#include "a.cpp"" in the header of b.cpp. insteadly, just give a definition about your prefered function and then use it. the detail information about this is http://blog.csdn.net/hairetz/archive/2009/10/10/4649320.aspx
4. make sure allocate a pointer memory unless you would returned by access denied since you might use some memory reserved by system.