C++ variable visable scopes and strems
问题 I am newbie in C++ and can't understand some behavior. Have function below and in this case it works. bool Network::doRequest(HTTPRequest& request, string path, string content) { HTTPResponse response; istream* respStreamPtr; session->sendRequest(request); respStreamPtr = &session->receiveResponse(response); if (response.getStatus() == HTTPResponse::HTTP_UNAUTHORIZED) { credentials->authenticate(request, response); session->sendRequest(request); respStreamPtr = &session->receiveResponse