摘要:
DescriptionDesign a class named Point to represent a point in the plane, and a class named Segment to represent a segment.Using the class interface as followsclass Point{public: Point(double x, double y); void setX(double x); void setY(double y); double getX(); double getY(); private: doub... 阅读全文
摘要:
DescriptionRewrite Exercise 7.18 using the string class with the following function header:bool isAnagram(const string &s1, const string &s2)Two words are anagrams if they contain the same letters in any order.自己班的作业写到烦了又跑去蹭别人班的题做……因为这是道改编题,不知道原题的要求是什么,纠结了很久=。=这里的anagram的要求应该是两个字符串具有相同的字符,每种 阅读全文