View Single Post
  #7   Spotlight this post!  
Unread 21-01-2006, 19:31
Andrew Blair's Avatar
Andrew Blair Andrew Blair is offline
SAE Formula is FIRST with Gasoline.
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry
Posts: 1,193
Andrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond repute
Send a message via AIM to Andrew Blair Send a message via Yahoo to Andrew Blair
Re: "call of function without prototype"

I guess my question is, why do you need the intermediary .h file?

If fileA.c has function "drive(int,int)", and both fileB.c and fileC.c need that function, why not call the function from fileA.c, instead of the prototype from fileA.h?

Maybe I missed your original idea. Does the .h file act as a condenser, #including prototypes from several files, so that instead of calling fileA,B,C.c, you simply call Condenser.h that contains all these prototypes?

Or does it simply act as a place holder, so that you can execute higher level code, while the function is still not actually written? So it calls the function prototype, so it will compile, but so that when you execute it, it does nothing? Thanks!
__________________
Reading makes a full man, conference a ready man, and writing an exact man.
-Sir Francis Bacon

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
-Albert Einstein