Actually this Q was discussed b4...sorry to ask it again.
In coding a Linked-list program, it is better to code the linked-list's header file first(I did it by refering the note distributed from my lecture). Eg:
Code:
/* begin ListInterface.h */
...
typedef struct nodeTag{
int data;
struct nodeTag *next;
}NODE_TYPE;
...
/* not details caz just example */
/* end ListInterface.h */
Then, i code the ListImplementation.cpp file which contains all the functions related to the operation in linked-list like insert, delete, search... and first Q1 comes: Why i have to includes the #include "ListInterface.h" in this ListImplementation.cpp?
Furthermore, when i procede, and code the main program, i must #include "ListInterface.h" also. Then, i code the rest until finish and compile. The result was: ERROR: Function need to be resolved.(the function in ListImplementation.cpp). I don't understand this, but i replaced the #include "ListInterface.h" with the #include "ListImplementation.cpp" and it works!!! No more errors and the program run. Why?