#include "header.h"
int main() {
// code ..
return 0;
}
header.h
int somefunc();
header.cc
int somefunc() {
return 0;
}
I''ve always made the file with main() in it be called something.cc or cpp. Then I include headers that prototype functions, and have the functions in it. Is there a reason why you would want to do the example above?