home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_12 / 692.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  694KB  |  2550x3300
Labels: book | crt screen | reckoner
OCR: 692 Chapter Discovering C++ Learning Activities Determine how to compile and link multiple source code files with your compiler. Compile link and execute the program contained in the files point.h, point. cpp and tstpoint.cpp. Make sure you get the same output as shown above and that you understand the code Modify the program by instantiating a third point, p3 Initialize the data members ofp3 with calls to set and set ( Then have the program display the point p3 and its distance from the origin Modify class Point by adding member function that calcu- lates the distance of the point from the origin You will need op0 the following: Modify the class declaration in point.h by adding member funct tion named Di stanceFromOr gin. Note that since the member function will work on the data of the in ...