This should do:
#include <iostream>
const char* foo() {
int some_number;
std::cout << "please enter number!" << std::endl;
std::cin >> some_number;
return "Number is odd";
}
(note that there was no requirement to link the output to the input in any way! ;-p )