From d757710f5dba0cef88428fb555d05d9cb6643e40 Mon Sep 17 00:00:00 2001 From: Pavetr Date: Tue, 21 Apr 2026 10:51:42 +0300 Subject: [PATCH] Created main program for testing --- main.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 main.cpp diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..b57e211 --- /dev/null +++ b/main.cpp @@ -0,0 +1,20 @@ +#include +#include +#include "JsonService.h" +#include "Weather.h" + +int main() { + try { + JsonService js; + Weather w = js.getWeather("endpoints/weather.json"); + + std::cout << "Weather object created" << std::endl; + w.printWeather(); + } + catch (const std::exception& e) { + std::cerr << "Error: " << e.what() << std::endl; + return 1; + } + + return 0; +}