here is my question
say I have a struct nodetype in the header file named linklist.h
there contains a struct constructor in the nodetype named nodetype(int, nodetype*)
how to I declare the code in the linklist.cpp?
do I do the same for class constructor or something different?

Yes, it's the same. Structs and classes in C++ only differ by the default visibility of their elements (public for structs and private for classes).

Yes, it's the same. Structs and classes in C++ only differ by the default visibility of their elements (public for structs and private for classes).

great!
thanks for the clarification

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.