A piece of code to check the Internet connection:
#include <Wininet.h> #pragma comment(lib, "wininet.lib") bool CheckConnection(const std::string InternetLink) { if (!InternetCheckConnectionW(InternetLink.c_str, FLAG_ICC_FORCE_CONNECTION, 0)) return 0; return 1; } I get an error: there is no suitable conversion function from "const std :: string" in "LPCWSTR
Then I wanted to call her like this:
is(!CheckConnection("http://google.com") {...}
Wvariant of the function, which accepts notchar*, butwchar_t*. - ߊߚߤߘ()afterc_str. This already eliminates such an error. And this suggests that the code that he compiles is not the code he brought here. Tworeturnsuccessors in a row also hint that there is some kind of BNOP, and not a real code. - AnT