[Cpp]/** Copyright and version statement of the program section * Copyright (c) 2012, student * All rightsreserved from computer College of Yantai University. * file name: object. cpp * Author: Li Meng * Completion Date: July 15, March 22, 2013 * version: v1.0 * input Description: none * Problem description: design the class of triangle circumference and area. * Program output: Triangle length and area */# include <iostream> # include <Cmath> using namespace std; class Triangle {public: void setABC (double x, double y, double z); // set the value of the three sides. Be sure to convert it into a triangle void getABC (double * x, double * y, double * z ); // double perimeter (void); // calculate the triangle perimeter double area (void); // calculate and return the Triangle area private: double a, B, c; // the three sides are private member data}; // define each member function void Triangle: setABC (double x, double y, double z) in the Triangle class below) {a = x; B = y; c = z;} void Triangle: getABC (double * x, double * y, double * z) {* x = a; * y = B; * z = c;} double Triangle: perimeter (void) {return (a + B + c);} double Triangle: area (void) {double area, k; k = (a + B + c)/2; area = sqrt (k * (k-a) * (k-B) * (k-c )); return area;} int main () {Triangle tri1; // defines an instance (object) of the Triangle class tri1.setABC (, 6); // double x, y, z; tri1.getABC (& x, & y, & z); // assign values of the three sides as x, y, and z to cout. <"the three sides are: "<x <'\ t' <y <<'\ T' <z <endl; cout <"Triangle perimeter:" <tri1.perimeter () <' \ t' <"area: "<tri1.area () <endl; system (" PAUSE "); return 0;} output result: an error in the program: not found at the beginning, I have not found any errors. I should be careful later!