Ok, this is probably really stupid, but I'm lost and want someone else to say what they think.

My teacher gave us an assignment and said that everything was in the file she sent us. So, I opened it and filled in all the coding as far as the comments told us to, and now I'm suppose to compile a program.

My problem, we were only given a header file and the implementation file for the class.

It is sorta implied I write a program or am I just suppose to compile the implementation file and make sure there are no errors?

Recommended Answers

All 2 Replies

>It is sorta implied I write a program
You can compile the implementation file without writing anything else. However, in some cases parts of a class won't be compiled (and thus won't throw errors if there's something wrong) unless you actually use them. So for a complete test you should write a simple main function that accesses the whole of the class' public interface.

Alright. Thanks. That's what I needed to hear.

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.