Created main program for testing

This commit is contained in:
2026-04-21 10:51:42 +03:00
parent 54f612e785
commit d757710f5d

20
main.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include <iostream>
#include <exception>
#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;
}