Traditional Culture Encyclopedia - Weather inquiry - How does C system return the value?
How does C system return the value?
Do you want to get the weather forecast through curl?
The first method:
Output the information obtained by curl to a file, and then analyze the contents in this file. This method is relatively simple:
system(" curl/data/sk/ 10 10 10 100 . html-s-o weather . txt ");
Then judge whether the information is successfully downloaded to weather.txt by the return value of the system. If successful, please open the file yourself and analyze its contents.
The second method does not call the system function. Use pipeline treatment. For example, MSVC's _popen function.
In order to do better, learn json.
- Previous article:Couples holding hands in a circle of friends talk about couples holding hair bands.
- Next article:Weather in Shi Ping 165438+ 10/0/7.
- Related articles
- Why can only "salt lake" form the effect of "mirror of the sky"?
- A joke about homophones
- Does the easterly wind mentioned in the weather forecast come from the east or from the east?
- Ancient poems about the Great Cold
- I want to travel to Jiuzhaigou in the second half of the year. 1 1 What's the weather like in the middle and late months? What's the temperature around?
- The families of the victims of Gansu cross-country race were compensated with 950,000 and 500,000 insurance, and their families refused to sign the visa. what do you think?
- Can you see Venus all year round? How to judge Venus at night?
- Words for heatstroke prevention in hot weather (80 sentences)
- Does anyone know where Jiujiang County in Jiangxi Province is?
- Cleaning and maintenance in snowy days.