我真的很困惑,为什么我在第13行的expected';'
上收到以下错误hSession
。我没有遗漏任何分号,所以我很困惑这个错误对我的代码意味着什么:< / p>
#include "stdafx.h"
#include <iostream>
#include <string>
#include <WinHttp.h>
int main()
{
// WinHTTP newHTTP("http://api/");
//initialize http and return session handle
HINTERNET hSession = WinHttpOpen(L"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36",
WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0);
//make the connection request
//HINTERNET hRequest = WinHTTpOpenRequest(hConnect, L"GET", NULL, NULL, NULL, NULL, 0); // open request and return HINTERNET handle
// WinHTTPSendRequests finallys makes the connection to url
//
int x;
std::cin >> x;
return 0;
}