21 lines
422 B
C++
21 lines
422 B
C++
#include <iostream>
|
|
#include <exception>
|
|
#include "XmlService.h"
|
|
#include "Weather.h"
|
|
|
|
int main() {
|
|
try {
|
|
XmlService xs;
|
|
Weather w = xs.getWeather("endpoints/weather.xml");
|
|
|
|
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;
|
|
}
|