|
Given a char* representing the five-digit zipcode you are interested in and a time_t representing the future time you are interested in, getWeather() accesses accuweather.com, parsing its html, and finds the relevant weather information for that zipcode and time if it's available. If time and zip are valid (see below), getWeather() will fill in the remaining three out parameters.
- Parameters:
-
| zip | Zipcode of location for which caller wants weather information . Only the first five digits provided will be used, all others will be ignored. |
| time | Time for which caller wants weather information. Must be in the future and within the next 14 days (how long accuweather.com has weather information for). |
| weatherLink | Out parameter filled in by getWeather(), provides the url to the accuweather.com for that time and zipcode. The char* must be allocated by the caller and be at least 300 chars in length. |
| pictureLink | Out parameter filled in by getWeateher(), provides the url to the image relating to the weather for that time and zipcode. The char* must be allocated by the caller and be at least 300 chars in length. |
| weatherDescription | Out parameter filled in by getWeather(), provides a short description of the weather for that time and zipcode including high and low temperatures and a sentence or two. The char* must be allocated by the caller and be at least 300 chars in length. |
- Returns:
- false if time is not within next 14 days, or if access to accuweather.com fails, or if zipcode is invalid. returns true otherwise.
|