You can not do that.

void specifically means no return

if you wan't to return an integer, just declare your function to return an integer:


int MyFunction()
{
cout << "My Statement";