When you call 'cout << getNewValue(number)', you are trying to print the result of a function that does not return a value and this can lead to:
Garbage output
A compiler warning
Even a crash
depending on the system and compiler.