i being ordered to change my function skill to returning value by using struct but not using pointer. may i know what is the pro and con between this 2?

You need to read books for all those details.

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.