Compilers 101: traditional procedure calls
Compilers 101: traditional procedure calls
int lookup(DATABASE *pDB, char *name, int age)
{
int index = -1; /* -1 == “not found” */
...
return(index);
}
void main(int argc, argv[])
{
char inputName[MAX_STR_LEN];
int result, age;
DATABASE db;
...
result = lookup(&db, inputName, age);
...
}