Why do you think it returned a value? It didn't. When you assign a variable like this, the behavior is undefined. The avoid this, add the keyword "void" before the function. If no keyword is present, the default is "int"! But besides that, it just looks sloppy to leave it blank like that.