I need to put cs
value inside the bracket for the object client
. I have already handle the cs
variable like this:
CString cs (bar_->GetHostName());
But still fail to put the value inside this below code:
WinHttpClient client(/* dont know what value to put here */);
client.SendHttpRequest();
Error message:
Error 1 error C2664: 'WinHttpClient::WinHttpClient(const std::wstring &)' : cannot convert parameter 1 from 'const char [15]' to 'const std::wstring &' c:\test.cpp
edit :
CString cs (bar_->GetHostName());
WinHttpClient client(/*??*/);
client.SendHttpRequest();
wstring httpResponseHeader = client.GetHttpResponseHeader();
wstring httpResponse = client.GetHttpResponse();
writeToStorage(httpResponse.c_str());
My function writeToStorage
suppose to write something to a textfile. It seems, overwriting the file with no strings in it.. I dont know why :(