:: getmessage (int msg)
{(msg) {LEFT: ();; RIGHT: ();; ENTER: ();;
}; ();
} :: Menu (int X, int Y)
{ x = X; = Y; = 0; [0] = &B1; [1] = &B2; [2] = & B3 ; [3] = &B4; * fin = fopen ("names.txt", "r"); str [80]; (int i = 0; i <4; i + +) {(str, 80, fin); [i] -> setparam (x, y, x + strlen (str) -2, y, str); = x + strlen (str);
} (fin); ();
}
Classes.cpp
# include
# include
# include
# include Point
{: (int x1 = 0, int y1 = 0); GetX (); GetY (); Show (int color);: x, y;
}; Circle: public Point
{: (Point & center, int r); Area (); GetRadius (); operator + (Circle & RHS); Show (int color = 14); Distance (Circle & C ); SetFlag (); GetFlag ();: R, flag;
};
// Implementation ::: Point (int x1, int y1)
{= x1; = y1;
} Point :: GetX ()
{x;
} Point :: GetY ()
{y;
} Point :: Show (int color)
{(color); (x, y, 2);
} :: Circle (Point & center, int r): (center.GetX (), center.GetY ())
{= r; = 0;
} Circle :: SetFlag ()
{= 1;
} Circle :: GetFlag ()
{flag;
} Circle :: Distance (Circle & C)
{sqrt (pow (xC.GetX (), 2) + pow (yC.GetY (), 2));
} Circle :: GetRadius ()
{R;
} Circle :: Show (int color)
{(color); (x, y, R);
} Circle :: Area ()
{M_PI * pow (R, 2);
} Circle :: operator + (Circle & RHS)
{d = Distance (RHS); ((d> = GetRadius () + RHS.GetRadius ()) | |
(abs (GetRadius ()-RHS.GetRadius ())> d)) 0; return 1;
}. cpp
# include "classes.cpp"
# include
# include
# include ()
{* datafile_name = "circles.txt",; grdr = DETECT, grmd; lines, r, x, y; (& grdr, & grdr, ""); f (datafile_name, ios :: binary); (! f)
{<<"Error opening the file" <
} = f.get (); = 1; (! f.eof ())
{(ch == ' n') + +; = f.get ();
}. close (); ** cir...