samedi 1 février 2020

How to use HRESULT condition check in C++

HRESULT hr = S_OK //initialization if (int i == 5) { hr = 1; //Is it correct usage?
} if (hr == 1) cout<<"The value of i is 5";

As i always heard hresult hr output in strings like E_Timeout etc whehter it's correct to use number like i've used.

Aucun commentaire:

Enregistrer un commentaire