how to return a value and store it from a function c++ code example Example: c++ check function return value #pragma GCC diagnostic error "-Wreturn-type"