I don't know why the compiler lets you declare main() that way (without void or a return type). But I think your problem is that using display() before declaring it implicitly declares it. Then the later definition doesn't match that implicit declaration.
|