From 78901ce84f1521c6c912b6ec6c365c2a30b0af52 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 13 May 2019 20:54:13 +0200 Subject: [PATCH] added figures for Windows --- Figures/Makefile | 27 +++++++++++++++++++++++++++ Figures/bin/a.exe | Bin 0 -> 69138 bytes Figures/include/Circle.h | 13 +++++++++++++ Figures/include/Figure.h | 9 +++++++++ Figures/include/Rectangle.h | 13 +++++++++++++ Figures/source/Circle.cpp | 19 +++++++++++++++++++ Figures/source/Rectangle.cpp | 16 ++++++++++++++++ Figures/source/main.cpp | 18 ++++++++++++++++++ logs/log1.txt | 9 --------- logs/log2.txt | 9 --------- zad7_3.cpp | 22 ++++++++++++++-------- 11 files changed, 129 insertions(+), 26 deletions(-) create mode 100644 Figures/Makefile create mode 100644 Figures/bin/a.exe create mode 100644 Figures/include/Circle.h create mode 100644 Figures/include/Figure.h create mode 100644 Figures/include/Rectangle.h create mode 100644 Figures/source/Circle.cpp create mode 100644 Figures/source/Rectangle.cpp create mode 100644 Figures/source/main.cpp delete mode 100644 logs/log1.txt delete mode 100644 logs/log2.txt diff --git a/Figures/Makefile b/Figures/Makefile new file mode 100644 index 0000000..0b5e439 --- /dev/null +++ b/Figures/Makefile @@ -0,0 +1,27 @@ +TARGET := figures + +BUILD_DIR := bin +SRC_DIR := source +INC_DIR := include + +SRCS := $(shell find $(SRC_DIR) -name *.cpp) +OBJS := $(SRCS:%=$(BUILD_DIR)/%.o) + +INC_FLAGS := $(addprefix -I,$(INC_DIR)) + +CPPFLAGS := $(INC_FLAGS) --std=c++14 + + +$(BUILD_DIR)/$(TARGET): $(OBJS) + echo $(LDFLAGS) + $(CXX) $(OBJS) -o $@ $(LDFLAGS) + +$(BUILD_DIR)/%.cpp.o: %.cpp + mkdir -p $(dir $@) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ + + +.PHONY: clean + +clean: + rm -rf $(BUILD_DIR)/* diff --git a/Figures/bin/a.exe b/Figures/bin/a.exe new file mode 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ykF;YPIVPh`Tkg|Z_8M{w&)rO4% z2m;WgD*+e+Qw!6OFkmk;?84H6E81};Onz4Ga-R@6Ocb&b3ad$=5Sa_kNgmcKjf&Y2 zIkPMTHdq}B@iPGC!oZPgkSFZa)}GVzyBZrcEH#q=nqfl2;-D`wzmS(~xz*K)wZ=J8 z!E?d{K!;CCn}Gyh7&*im-U=!80L_nlbV*hxO?E*h6OSV?Fdz#DH2?&~^|#1=-gHZZ z)6q|DuC;QGi8iLf&4$xXEVwOFBZjmfBb(m01dPD%Dy5)D)JI5mffxsnSV~9~S>Jr; zOVl<{ph+|jQMYw2?ruFB-%iz0Mpw64T5x8&J#thmjYuTk~QK=ER8+^BNxvp_kkBNHy`mx{9K>6qv?qkK~i=ABxzS|`i8VXZ?(v= zRgJxxu3tF@YuH+Sb|EadP;GFlL&1h1Z^DAb-^0fu%jfULvv@rZdJ5Au{e+{+2E!oU z`mzQnV!DFp{shU54K)TL8HS8aoCjS8v$*_g3)ez!*<7SyQRt!{k9=2oA$}>(L+&uH z>x%fQ$!*ZWQr(3tM977Ag{_DiD|&dXUdi22nf*qLXWA82W-Ys&?gS*D6Ogcg8n>H4 z+UHgcT4Tab2_2HBvs36$y6KdL58@T@GUkFhARzH>BLNT3&xk?fMYe_-E??A^j1Z^` z@l|0{xuUf8qTqWhi*l(}WCXP1L{`Ksb-vc=`*$itCs*b=jBEaiV~vl7$T~KNuQ+iO zuvNNS=bdiB<;l9FU=%-FO=rZAw6%1iceWG<@~!qh7H_-L&>`fa$trDM6q?ynW(>rz zt7+hF+17&=>u%xSXJ_&P{l=DS1r3`^)-DH$GzZ-fh#N}d`}ii_MS{CRz=-H(w^>_S Vo1uN2gL0VnWd5yTk6!f<`2R@}p`ri) literal 0 HcmV?d00001 diff --git a/Figures/include/Circle.h b/Figures/include/Circle.h new file mode 100644 index 0000000..dfe6819 --- /dev/null +++ b/Figures/include/Circle.h @@ -0,0 +1,13 @@ +#pragma once + +#include "Figure.h" +#include + +class Circle : public Figure { + public: + float r; + Circle(); + Circle(float _r); + virtual std::string type() const; + virtual float area() const; +}; diff --git a/Figures/include/Figure.h b/Figures/include/Figure.h new file mode 100644 index 0000000..609fc8f --- /dev/null +++ b/Figures/include/Figure.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +class Figure { + public: + virtual std::string type() const = 0; + virtual float area() const = 0; +}; \ No newline at end of file diff --git a/Figures/include/Rectangle.h b/Figures/include/Rectangle.h new file mode 100644 index 0000000..2731c13 --- /dev/null +++ b/Figures/include/Rectangle.h @@ -0,0 +1,13 @@ +#pragma once + +#include "Figure.h" +#include + +class Rectangle : public Figure { + public: + float w,h; + Rectangle(); + Rectangle(float _w, float _h); + virtual std::string type() const; + virtual float area() const; +}; \ No newline at end of file diff --git a/Figures/source/Circle.cpp b/Figures/source/Circle.cpp new file mode 100644 index 0000000..8c806b2 --- /dev/null +++ b/Figures/source/Circle.cpp @@ -0,0 +1,19 @@ +#include "../include/Circle.h" +#include + +#define PI 3.141592653589793238463 + +using namespace std; + + +Circle::Circle(){r=0;} + +Circle::Circle(float _r){r=_r;} + +string Circle::type() const { + return "Circle"; +} + +float Circle::area() const { + return PI * r * r; +} \ No newline at end of file diff --git a/Figures/source/Rectangle.cpp b/Figures/source/Rectangle.cpp new file mode 100644 index 0000000..81d1f0d --- /dev/null +++ b/Figures/source/Rectangle.cpp @@ -0,0 +1,16 @@ +#include "../include/Rectangle.h" +#include +using namespace std; + + +Rectangle::Rectangle() : w(0), h(0) {} + +Rectangle::Rectangle(float _w, float _h) : w(_w), h(_h) {} + +string Rectangle::type() const { + return "Rectangle"; +} + +float Rectangle::area() const { + return w * h; +} \ No newline at end of file diff --git a/Figures/source/main.cpp b/Figures/source/main.cpp new file mode 100644 index 0000000..1e3832a --- /dev/null +++ b/Figures/source/main.cpp @@ -0,0 +1,18 @@ +#include "../include/Circle.h" +#include "../include/Rectangle.h" +#include +#include +using namespace std; + +int main(){ + vector figures = { + (Figure*)new Rectangle(10, 2), + (Figure*)new Rectangle(3, 3), + (Figure*)new Circle(5), + (Figure*)new Circle(1) + }; + for (Figure *f : figures) { + cout << f->type() << ": area = " << f->area() << "\n"; + } + return 0; +} diff --git a/logs/log1.txt b/logs/log1.txt deleted file mode 100644 index 877d834..0000000 --- a/logs/log1.txt +++ /dev/null @@ -1,9 +0,0 @@ -cpp1 -cpp2 -ilovecpp -linuxoverwindows -123 -456 -789 -abc -qwe diff --git a/logs/log2.txt b/logs/log2.txt deleted file mode 100644 index 877d834..0000000 --- a/logs/log2.txt +++ /dev/null @@ -1,9 +0,0 @@ -cpp1 -cpp2 -ilovecpp -linuxoverwindows -123 -456 -789 -abc -qwe diff --git a/zad7_3.cpp b/zad7_3.cpp index 02741e2..5471646 100644 --- a/zad7_3.cpp +++ b/zad7_3.cpp @@ -5,16 +5,22 @@ using namespace std; template class Array { private: - type* ptrs; - Array(){} - ~Array(){} + type* basePtr; + Array(unsigned int n){ + basePtr=(type*)malloc(sizeof(type)*n); //allocate the memory + } + ~Array(){ + free(basePtr); + } public: - Array& operator new [](){ - Array(); + Array& operator new [](unsigned int n){ + Array(n); return *this; } - void operator delete [](){ + void* operator delete [](unsigned int n){ ~Array(); } - -} \ No newline at end of file + type operator[](){ + return + } +};