Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------- Build: Debug in ppp12 (compiler: GNU GCC Compiler)---------------
- g++ -I/usr/include/freetype2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_THREAD_SAFE -D_REENTRANT -std=c++14 -g -std=c++14 -c /home/username/codeblocks_proj/ppp12/Graph.cpp -o obj/Debug/Graph.o
- In file included from /home/username/codeblocks_proj/ppp12/Graph.cpp:1:0:
- /home/username/codeblocks_proj/ppp12/Graph.h:89:2: error: ‘vector’ does not name a type
- vector<T*> v;
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:90:2: error: ‘vector’ does not name a type
- vector<T*> owned;
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In destructor ‘Graph_lib::Vector_ref<T>::~Vector_ref()’:
- /home/username/codeblocks_proj/ppp12/Graph.h:102:34: error: ‘owned’ was not declared in this scope
- ~Vector_ref() { for (int i=0; i<owned.size(); ++i) delete owned[i]; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘void Graph_lib::Vector_ref<T>::push_back(T&)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:104:25: error: ‘v’ was not declared in this scope
- void push_back(T& s) { v.push_back(&s); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘void Graph_lib::Vector_ref<T>::push_back(T*)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:105:25: error: ‘v’ was not declared in this scope
- void push_back(T* p) { v.push_back(p); owned.push_back(p); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:105:41: error: ‘owned’ was not declared in this scope
- void push_back(T* p) { v.push_back(p); owned.push_back(p); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘T& Graph_lib::Vector_ref<T>::operator[](int)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:109:33: error: ‘v’ was not declared in this scope
- T& operator[](int i) { return *v[i]; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘const T& Graph_lib::Vector_ref<T>::operator[](int) const’:
- /home/username/codeblocks_proj/ppp12/Graph.h:110:45: error: ‘v’ was not declared in this scope
- const T& operator[](int i) const { return *v[i]; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘int Graph_lib::Vector_ref<T>::size() const’:
- /home/username/codeblocks_proj/ppp12/Graph.h:111:28: error: ‘v’ was not declared in this scope
- int size() const { return v.size(); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: At global scope:
- /home/username/codeblocks_proj/ppp12/Graph.h:119:24: error: expected ‘)’ before ‘<’ token
- Shape(initializer_list<Point> lst); // add() the Points to this Shape
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:158:2: error: ‘vector’ does not name a type
- vector<Point> points; // not used by all shapes
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘void Graph_lib::Shape::add(Graph_lib::Point)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:125:21: error: ‘points’ was not declared in this scope
- void add(Point p){ points.push_back(p); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘void Graph_lib::Shape::set_point(int, Graph_lib::Point)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:126:35: error: ‘points’ was not declared in this scope
- void set_point(int i, Point p) { points[i] = p; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘Graph_lib::Point Graph_lib::Shape::point(int) const’:
- /home/username/codeblocks_proj/ppp12/Graph.h:143:36: error: ‘points’ was not declared in this scope
- Point point(int i) const { return points[i]; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘int Graph_lib::Shape::number_of_points() const’:
- /home/username/codeblocks_proj/ppp12/Graph.h:144:44: error: ‘points’ was not declared in this scope
- int number_of_points() const { return int(points.size()); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In constructor ‘Graph_lib::Rectangle::Rectangle(Graph_lib::Point, int, int)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:192:61: error: ‘error’ was not declared in this scope
- if (h<=0 || w<=0) error("Bad rectangle: non-positive side");
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In constructor ‘Graph_lib::Rectangle::Rectangle(Graph_lib::Point, Graph_lib::Point)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:197:71: error: ‘error’ was not declared in this scope
- if (h<=0 || w<=0) error("Bad rectangle: first point is not top left");
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: At global scope:
- /home/username/codeblocks_proj/ppp12/Graph.h:238:24: error: expected ‘)’ before ‘<’ token
- Lines(initializer_list<Point> lst) : Shape{lst} { if (lst.size() % 2) error("odd number of points for Lines"); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:238:50: error: expected unqualified-id before ‘{’ token
- Lines(initializer_list<Point> lst) : Shape{lst} { if (lst.size() % 2) error("odd number of points for Lines"); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:245:22: error: ‘string’ does not name a type
- Text(Point x, const string& s) : lab{ s } { add(x); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:249:23: error: ‘string’ does not name a type
- void set_label(const string& s) { lab = s; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:250:2: error: ‘string’ does not name a type
- string label() const { return lab; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:258:2: error: ‘string’ does not name a type
- string lab; // label
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In constructor ‘Graph_lib::Text::Text(Graph_lib::Point, const int&)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:245:35: error: class ‘Graph_lib::Text’ does not have any field named ‘lab’
- Text(Point x, const string& s) : lab{ s } { add(x); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘void Graph_lib::Text::set_label(const int&)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:249:36: error: ‘lab’ was not declared in this scope
- void set_label(const string& s) { lab = s; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: At global scope:
- /home/username/codeblocks_proj/ppp12/Graph.h:267:70: error: ‘string’ has not been declared
- Axis(Orientation d, Point xy, int length, int nummber_of_notches=0, string label = "");
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:267:85: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
- Axis(Orientation d, Point xy, int length, int nummber_of_notches=0, string label = "");
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘Graph_lib::Point Graph_lib::Ellipse::focus1() const’:
- /home/username/codeblocks_proj/ppp12/Graph.h:306:72: error: ‘sqrt’ was not declared in this scope
- Point focus1() const { return{ center().x + int(sqrt(double(w*w - h*h))), center().y }; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:306:87: error: could not convert ‘{<expression error>, Graph_lib::Ellipse::center().Graph_lib::Point::y}’ from ‘<brace-enclosed initializer list>’ to ‘Graph_lib::Point’
- Point focus1() const { return{ center().x + int(sqrt(double(w*w - h*h))), center().y }; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In member function ‘Graph_lib::Point Graph_lib::Ellipse::focus2() const’:
- /home/username/codeblocks_proj/ppp12/Graph.h:307:72: error: ‘sqrt’ was not declared in this scope
- Point focus2() const { return{ center().x - int(sqrt(double(w*w - h*h))), center().y }; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:307:87: error: could not convert ‘{<expression error>, Graph_lib::Ellipse::center().Graph_lib::Point::y}’ from ‘<brace-enclosed initializer list>’ to ‘Graph_lib::Point’
- Point focus2() const { return{ center().x - int(sqrt(double(w*w - h*h))), center().y }; }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: At global scope:
- /home/username/codeblocks_proj/ppp12/Graph.h:326:24: error: ‘string’ does not name a type
- Marked_polyline(const string& m) :mark(m) { }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:329:2: error: ‘string’ does not name a type
- string mark;
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In constructor ‘Graph_lib::Marked_polyline::Marked_polyline(const int&)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:326:36: error: class ‘Graph_lib::Marked_polyline’ does not have any field named ‘mark’
- Marked_polyline(const string& m) :mark(m) { }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: At global scope:
- /home/username/codeblocks_proj/ppp12/Graph.h:333:14: error: ‘string’ does not name a type
- Marks(const string& m) :Marked_polyline(m)
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: In constructor ‘Graph_lib::Mark::Mark(Graph_lib::Point, char)’:
- /home/username/codeblocks_proj/ppp12/Graph.h:338:43: error: ‘string’ was not declared in this scope
- Mark(Point xy, char c) : Marks(string(1,c)) {add(xy); }
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h: At global scope:
- /home/username/codeblocks_proj/ppp12/Graph.h:361:37: error: ‘string’ does not name a type
- Suffix::Encoding get_encoding(const string& s);
- ^
- /home/username/codeblocks_proj/ppp12/Graph.h:364:18: error: ‘string’ has not been declared
- Image(Point xy, string s, Suffix::Encoding e = Suffix::none);
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp: In member function ‘virtual void Graph_lib::Shape::draw_lines() const’:
- /home/username/codeblocks_proj/ppp12/Graph.cpp:8:32: error: ‘points’ was not declared in this scope
- if (color().visibility() && 1<points.size()) // draw sole pixel?
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp: At global scope:
- /home/username/codeblocks_proj/ppp12/Graph.cpp:27:8: error: ‘pair’ does not name a type
- inline pair<double,double> line_intersect(Point p1, Point p2, Point p3, Point p4, bool& parallel)
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp: In function ‘bool Graph_lib::line_segment_intersect(Graph_lib::Point, Graph_lib::Point, Graph_lib::Point, Graph_lib::Point, Graph_lib::Point&)’:
- /home/username/codeblocks_proj/ppp12/Graph.cpp:54:4: error: ‘pair’ was not declared in this scope
- pair<double,double> u = line_intersect(p1,p2,p3,p4,parallel);
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp:54:4: note: suggested alternative:
- In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
- from /usr/include/c++/5/vector:60,
- from /home/username/codeblocks_proj/ppp12/Graph.h:6,
- from /home/username/codeblocks_proj/ppp12/Graph.cpp:1:
- /usr/include/c++/5/bits/stl_pair.h:96:12: note: ‘std::pair’
- struct pair
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp:54:9: error: expected primary-expression before ‘double’
- pair<double,double> u = line_intersect(p1,p2,p3,p4,parallel);
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp:55:20: error: ‘u’ was not declared in this scope
- if (parallel || u.first < 0 || u.first > 1 || u.second < 0 || u.second > 1) return false;
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp:56:28: error: ‘u’ was not declared in this scope
- intersection.x = p1.x + u.first*(p2.x - p1.x);
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp: In member function ‘void Graph_lib::Polygon::add(Graph_lib::Point)’:
- /home/username/codeblocks_proj/ppp12/Graph.cpp:66:68: error: ‘error’ was not declared in this scope
- if (p==point(np-1)) error("polygon point equal to previous point");
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp:68:64: error: ‘line_intersect’ was not declared in this scope
- line_intersect(point(np-1),p,point(np-2),point(np-1),parallel);
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp:70:53: error: ‘error’ was not declared in this scope
- error("two polygon points lie in a straight line");
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp:74:19: error: no matching function for call to ‘Graph_lib::Point::Point(int, int)’
- Point ignore(0,0);
- ^
- In file included from /home/username/codeblocks_proj/ppp12/Graph.h:5:0,
- from /home/username/codeblocks_proj/ppp12/Graph.cpp:1:
- /home/username/codeblocks_proj/ppp12/Point.h:9:8: note: candidate: Graph_lib::Point::Point()
- struct Point {
- ^
- /home/username/codeblocks_proj/ppp12/Point.h:9:8: note: candidate expects 0 arguments, 2 provided
- /home/username/codeblocks_proj/ppp12/Point.h:9:8: note: candidate: constexpr Graph_lib::Point::Point(const Graph_lib::Point&)
- /home/username/codeblocks_proj/ppp12/Point.h:9:8: note: candidate expects 1 argument, 2 provided
- /home/username/codeblocks_proj/ppp12/Point.h:9:8: note: candidate: constexpr Graph_lib::Point::Point(Graph_lib::Point&&)
- /home/username/codeblocks_proj/ppp12/Point.h:9:8: note: candidate expects 1 argument, 2 provided
- /home/username/codeblocks_proj/ppp12/Graph.cpp:76:32: error: ‘error’ was not declared in this scope
- error("intersect in polygon");
- ^
- /home/username/codeblocks_proj/ppp12/Graph.cpp: In member function ‘virtual void Graph_lib::Polygon::draw_lines() const’:
- /home/username/codeblocks_proj/ppp12/Graph.cpp:86:70: error: ‘error’ was not declared in this scope
- Process terminated with status 1 (0 minute(s), 0 second(s))
- 50 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement