Сравнить коммиты

..

Ничего общего в коммитах. '5bd52d8465102cfc90606bcd533a9f53e847ba53' и '33fb81a6bbbc7d4f4f62ae112f99cfb69af08faa' имеют совершенно разные истории.

@ -33,14 +33,12 @@
<Add option="-fexceptions" /> <Add option="-fexceptions" />
</Compiler> </Compiler>
<Unit filename="histogram.cpp" /> <Unit filename="histogram.cpp" />
<Unit filename="histogram.h" />
<Unit filename="main.cpp" /> <Unit filename="main.cpp" />
<Unit filename="svg.cpp" /> <Unit filename="svg.cpp" />
<Unit filename="svg.h"> <Unit filename="svg.h">
<Option target="&lt;{~None~}&gt;" /> <Option target="&lt;{~None~}&gt;" />
</Unit> </Unit>
<Unit filename="text.cpp" /> <Unit filename="text.cpp" />
<Unit filename="text.h" />
<Extensions> <Extensions>
<lib_finder disable_auto="1" /> <lib_finder disable_auto="1" />
</Extensions> </Extensions>

@ -11,31 +11,30 @@ struct Input {
}; };
Input Input
input_data(istream& in, bool prompt) { input_data() {
size_t number_count; size_t number_count;
if (prompt) {cerr << "Enter number count: ";} cerr << "Enter number count: ";
in >> number_count; cin >> number_count;
Input in1; Input in;
in1.numbers.resize(number_count); in.numbers.resize(number_count);
if (prompt) {cerr << "Enter numbers: ";} cerr << "Enter numbers: ";
for (size_t i = 0; i < number_count; i++) { for (size_t i = 0; i < number_count; i++) {
in >> in1.numbers[i]; cin >> in.numbers[i];
} }
if (prompt) {cerr << "Enter bin count: ";} cerr << "Enter bin count: ";
in >> in1.bin_count; cin >> in.bin_count;
return in1; return in;
} }
int main() int main()
{ {
const size_t SCREEN_WIDTH = 80; const size_t SCREEN_WIDTH = 80;
const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1; const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1;
bool prompt = true;
auto in = input_data(cin, prompt); auto in = input_data();
auto bins = make_histogram(in.numbers, in.bin_count); auto bins = make_histogram(in.numbers, in.bin_count);
show_histogram_svg(bins); show_histogram_svg(bins);
return 0; return 0;

Загрузка…
Отмена
Сохранить