Please help me soplve the programming problem that has been given to me as homework. I know its bad to get the source from someone else, but plezz help Im a newbie and have no idea what friend functions do: :blink:
Create 2 classes DM and DB which store the value of distance. DM store distances in meters and cm and DB in feet and inches. Write a program that can read values for the class objects and add one object DM with another object of DB.
Use a friend function to carry out the addition operation the object that stores the results may be a DM object or a DB object, depending upon the units in which the results are required. The display should be in the format of feet and inches or meters and cms depending on the object on display.
PS: I'll study what friend function means this weekend. But have to do this homework submission by tomorrow, so plezzz help. I know this may be a cakewalk for most C++ programmers, but Im still a school student.
Nice. The Intel Dell laptops we're forced to use at work are going to spin their fans even more frequently now. Earlier it was just all the time Windows Update, Windows Search Indexer, Dell Telemetry, and Windows Defender went crazy, now we'll also hear the soft tones of the nearby fan when opening apps.
Still the laggiest file manager I've had the misfortune to lay my eyes on. They should just halt development until they can fix this. I strongly recommend Total Commander, XYPlorer or Double Commander over this.
from https://pureinfotech.com/windo...-profile-cpu-boost-feature/
Note that I didn't see this actually affect anything until I used this version of the vivetool command:
vivetool /enable /id:58989092,60716524,48433719,61391826
Apparently, one of these options actually enables the low latency flag for applications, etc. If someone knows more, I'd love to hear it!
So far, I have noticed no downsides, but YMMV.
I do like Edifier products. You have to be careful with their model numbers if you care about specific I/O, like optical in. They often have multiple products with nearly identical part numbers, so close the Amazon will sometimes suggest the wrong one even if you copy/paste the exact model from their site. Things like optical typically are the difference between one and the other.
Question
sunbiz_3000
Please help me soplve the programming problem that has been given to me as homework. I know its bad to get the source from someone else, but plezz help Im a newbie and have no idea what friend functions do: :blink:
Create 2 classes DM and DB which store the value of distance. DM store distances in meters and cm and DB in feet and inches. Write a program that can read values for the class objects and add one object DM with another object of DB.
Use a friend function to carry out the addition operation the object that stores the results may be a DM object or a DB object, depending upon the units in which the results are required. The display should be in the format of feet and inches or meters and cms depending on the object on display.
PS: I'll study what friend function means this weekend. But have to do this homework submission by tomorrow, so plezzz help. I know this may be a cakewalk for most C++ programmers, but Im still a school student.
Link to comment
https://www.neowin.net/forum/topic/190328-homework-for-friend-functions/Share on other sites
15 answers to this question
Recommended Posts