0
비동기 코드가 작동하지만 기본 코드에서 반환 값을 사용할 수있는 방법이 표시되지 않습니다. 이것이 가능한가? 내가 본 모든 예들은 계속적인 논리에서 모든 논리를 보여줍니다. 모든 코드를 웹 API 호출과 비동기로 변환하고 싶지는 않습니다.C++ Rest SDK 초기 호출에서 값 가져 오기
pplx::task<void> GetXMLAsync() {
http_client client("url")
return client.request().then([=](http_response response) {
<< get result, parse it and return the **values** >>
});
int main(int argc, char* argv[]){
GetXMLAsync().wait();
use the **values** in the rest of the code
}
이 점에 대해 통찰력을 주셔서 감사합니다. 감사합니다