добавил bool promt, изменил imput
Этот коммит содержится в:
Двоичные данные
bin/Debug/unittest.exe
Двоичные данные
bin/Debug/unittest.exe
Двоичный файл не отображается.
31
main.cpp
31
main.cpp
@@ -1,7 +1,13 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#inclide <cmath>
|
||||
#invlude <string>
|
||||
#include "histogram.h"
|
||||
#include "text.h"
|
||||
#include <conio.h>
|
||||
#include "histogram_internal.h"
|
||||
#include <curl/curl.h>
|
||||
#include <sstream>
|
||||
#include "svg.h"
|
||||
|
||||
|
||||
@@ -14,27 +20,30 @@ size_t bin_count{};
|
||||
};
|
||||
|
||||
Input
|
||||
input_data()
|
||||
input_data(istream &tin, bool promt)
|
||||
{
|
||||
size_t number_count;
|
||||
cin>> number_count;
|
||||
|
||||
|
||||
|
||||
Input in;
|
||||
size_t number_count;
|
||||
|
||||
if (promt)
|
||||
{
|
||||
cerr << "enter number count";
|
||||
}
|
||||
tin>> number_count;
|
||||
|
||||
|
||||
|
||||
in.numbers.resize(number_count);
|
||||
for (size_t i = 0; i < number_count; i++)
|
||||
{
|
||||
cin>> in.numbers[i];
|
||||
in>> in.numbers[i];
|
||||
}
|
||||
cin >>in.bin_count;
|
||||
|
||||
char in.arr[bin_count];
|
||||
for(int i=0; i<bin_count;i++)
|
||||
if (promt)
|
||||
{
|
||||
cin>>in.arr[i];
|
||||
cerr<<"enter bin count:";
|
||||
}
|
||||
in >>in.bin_count;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
Двоичные данные
obj/Debug/histogram.o
Двоичные данные
obj/Debug/histogram.o
Двоичный файл не отображается.
@@ -55,6 +55,6 @@
|
||||
"histogram.h"
|
||||
<vector>
|
||||
|
||||
1685565442 c:\users\Øåñòîâ Äåíèñ\desktop\laba3\histogram.h
|
||||
1686126750 c:\users\Øåñòîâ Äåíèñ\desktop\laba3\histogram.h
|
||||
<vector>
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user