diff --git a/histogram.cpp b/histogram.cpp index ce7a325..78f4edf 100644 --- a/histogram.cpp +++ b/histogram.cpp @@ -1,6 +1,6 @@ #include "histogram.h" -void find_minmax(std::vector vec, double& min, double& max) { +void find_minmax(vector vec, double& min, double& max) { min = vec[0]; diff --git a/histogram_internal.h b/histogram_internal.h index 4567891..3b50f2f 100644 --- a/histogram_internal.h +++ b/histogram_internal.h @@ -1,6 +1,6 @@ #ifndef HISTOGRAM_INTERNAL_H_INCLUDED #define HISTOGRAM_INTERNAL_H_INCLUDED - -void find_minmax(std::vector vec, double& min, double& max); +using namespace std; +void find_minmax(vector vec, double& min, double& max); #endif // HISTOGRAM_INTERNAL_H_INCLUDED diff --git a/laba01.cbp b/laba01.cbp index 8b0334c..1d431b1 100644 --- a/laba01.cbp +++ b/laba01.cbp @@ -32,7 +32,13 @@ + + + + + + diff --git a/main.cpp b/main.cpp index 551e54b..3980e6b 100644 --- a/main.cpp +++ b/main.cpp @@ -2,9 +2,9 @@ #include #include "histogram.h" #include "text.h" - +#include "svg.h" struct Input { - std::vector numbers; + vector numbers; size_t bin_count{}; }; @@ -12,18 +12,18 @@ Input input_data() { Input in; size_t number_count; - std::cerr << "Enter the number of elements: "; - std::cin >> number_count; + cerr << "Enter the number of elements: "; + cin >> number_count; in.numbers.resize(number_count); - std::cerr << "\nEnter " << number_count << " elements:" << std::endl; + cerr << "\nEnter " << number_count << " elements:" << endl; for (size_t i = 0; i < number_count; i++) { - std::cin >> in.numbers[i]; + cin >> in.numbers[i]; } - std::cerr << "Enter the number of bins: "; - std::cin >> in.bin_count; + cerr << "Enter the number of bins: "; + cin >> in.bin_count; return in; } @@ -31,6 +31,6 @@ Input input_data() { int main() { auto in = input_data(); auto bins = make_histogram(in.bin_count, in.numbers); - show_histogram(bins); + show_histogram_svg(bins); return 0; } diff --git a/text.cpp b/text.cpp index add972a..3ca4555 100644 --- a/text.cpp +++ b/text.cpp @@ -1,7 +1,7 @@ #include "text.h" #include -void show_histogram(const vector& bins) { +void show_histogram(const std::vector& bins) { bool gigant = false; diff --git a/text.h b/text.h index df05754..fd8c2d1 100644 --- a/text.h +++ b/text.h @@ -2,7 +2,7 @@ #define TEXT_H_INCLUDED #include - -void show_histogram(const vector& bins); +using namespace std; +void show_histogram(const std::vector& bins); #endif // TEXT_H_INCLUDED diff --git a/unittest/bin/Debug/unittest.exe b/unittest/bin/Debug/unittest.exe index d854462..f8ce217 100644 Binary files a/unittest/bin/Debug/unittest.exe and b/unittest/bin/Debug/unittest.exe differ diff --git a/unittest/obj/Debug/histogram.o b/unittest/obj/Debug/histogram.o index e1f6ebb..0f902e2 100644 Binary files a/unittest/obj/Debug/histogram.o and b/unittest/obj/Debug/histogram.o differ diff --git a/unittest/obj/Debug/unittest.o b/unittest/obj/Debug/unittest.o index 51853c6..2a29363 100644 Binary files a/unittest/obj/Debug/unittest.o and b/unittest/obj/Debug/unittest.o differ diff --git a/unittest/unittest.cbp b/unittest/unittest.cbp index 7f9621b..0154cc0 100644 --- a/unittest/unittest.cbp +++ b/unittest/unittest.cbp @@ -31,6 +31,19 @@ + + + + + + + + + + diff --git a/unittest/unittest.depend b/unittest/unittest.depend index 0627a11..e19dca0 100644 --- a/unittest/unittest.depend +++ b/unittest/unittest.depend @@ -1,12 +1,12 @@ # depslib dependency file v1.0 -1748213255 source:c:\users\home\desktop\lab34\laba01\histogram.cpp +1748243702 source:c:\users\home\desktop\lab34\laba01\histogram.cpp "histogram.h" -1748213210 c:\users\home\desktop\lab34\laba01\histogram.h +1748243652 c:\users\home\desktop\lab34\laba01\histogram.h -1748213127 source:c:\users\home\desktop\lab34\laba01\unittest.cpp +1748213519 source:c:\users\home\desktop\lab34\laba01\unittest.cpp "doctest.h" "histogram_internal.h" @@ -55,5 +55,81 @@ -1748213259 c:\users\home\desktop\lab34\laba01\histogram_internal.h +1748243717 c:\users\home\desktop\lab34\laba01\histogram_internal.h + +1748242437 source:c:\users\home\desktop\lab34\laba01\svg.cpp + "svg.h" + +1748242437 c:\users\home\desktop\lab34\laba01\svg.h + + + + + +1748243704 source:c:\users\u111-15\desktop\lab34\laba01\histogram.cpp + "histogram.h" + +1748243654 c:\users\u111-15\desktop\lab34\laba01\histogram.h + + + +1748386434 source:c:\users\u111-15\desktop\lab34\laba01\svg.cpp + "svg.h" + +1748242438 c:\users\u111-15\desktop\lab34\laba01\svg.h + + + + + +1748213520 source:c:\users\u111-15\desktop\lab34\laba01\unittest.cpp + "doctest.h" + "histogram_internal.h" + +1748430259 c:\users\u111-15\desktop\lab34\laba01\doctest.h + + + + + + + "doctest_fwd.h" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1748243718 c:\users\u111-15\desktop\lab34\laba01\histogram_internal.h