If I just do it: Ex1:
#include int main() { //try to call doSomething function doSomething(); } void doSomething(
You can't call a function without the compiler having seen either the definition or a declaration, first -- simple as that. A prototype or the actual definition must appear before a call.