Temporary objects are created by compiler to store temporary values which are need for a short period of time. For example, return value from a function.

 
std::cout << getSomeValue();