code: загрузка файла по сети

main
FilippovDY 11 месяцев назад
Родитель 95220556fa
Сommit 525faaf72b

@ -7,7 +7,8 @@
using namespace std;
struct Input {
struct Input
{
vector<double> numbers;
size_t bin_count{};
size_t number_count{};
@ -15,20 +16,24 @@ struct Input {
};
Input
input_data(istream& stream, bool prompt) {
input_data(istream& stream, bool prompt)
{
size_t number_count;
if (prompt) {
cerr << "Enter number count: ";
if (prompt)
{
cerr << "Enter number count: ";
}
stream >> number_count;
Input in;
if (prompt) {
cerr << "Enter bin count: ";
if (prompt)
{
cerr << "Enter bin count: ";
}
stream >> in.bin_count;
vector<double> numbers(in.number_count);
in.numbers.resize(in.number_count);
for (size_t i = 0; i < in.number_count; i++) {
for (size_t i = 0; i < in.number_count; i++)
{
stream >> in.numbers[i];
}
size_t bin_count;
@ -39,14 +44,19 @@ input_data(istream& stream, bool prompt) {
int main(int argc, char* argv[]){
int main(int argc, char* argv[])
{
if (argc > 1){
auto i = 0;
while (i < argc){
cerr << "arg[" << i << "] = " << argv[i] << endl;
i++;
}
if (argc > 1)
{
CURL* curl = curl_easy_init();
if(curl)
{
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
curl_global_init(CURL_GLOBAL_ALL);

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