write a c++ class run that contains followin data member
1)name of runner.
2)distance covered by runner.
class ha following member function
1)get function for input runner name and distance.
2)show function to display runner name and distance.
the user should be able to show the name of the runner who has
covered the longest distance at any point of time. HINT(use static data member).

i can not understand that how to use static data member in this programe. PLZ help me.

Recommended Answers

I did, and I got -1 reputation or whatever on that post. So thanks for that as well.

http://www.daniweb.com/software-development/cpp/threads/476648/static-data-member-function#post2082150

Jump to Post

All 2 Replies

This is a terrible use for a static data member.

That said, someone gave you code already in the other thread.

Be a part of the DaniWeb community

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