hi
I wanna ask about virtual function.. why we use it & when?
and what is the different between friend function & member function in class??
:)

>Q
Really? I'm surprised you took the time to hold down the shift key if you were too lazy to come up with any kind of useful title.

>I wanna ask about virtual function.. why we use it & when?
You make a member function virtual when you want to change it's behavior between base and derived classes without changing the interface. This is how C++ handles polymorphism.

>what is the different between friend function & member function in class??
Friend functions have full access to a class, but aren't restricted to member function call syntax. They're a slightly weaker extension of the class interface.

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.