"Rob Graber" <[EMAIL PROTECTED]> wrote in message
news:10788@palm-dev-forum...
> When I remove the 'static', then I get an error like:
>
> Warning : function has no prototype

You need to put the prototype in each .c file, or better yet, put it in a .h
file included by both .c files.

> Just exactly what would my ".h" file look like?

At a minimum, it would include the function prototype. You might want to set
it up so it can be #included more than once. In CodeWarrior, this can be
done by putting the following at the top:

    #pragma once

A more universal technique is to wrap the entire file:

    #ifndef __FOO_H__
    #define __FOO_H__

    ... entire contents of file ...

    #endif        // __FOO_H__

where FOO is the name of your .h file in all caps. (This is just a
convention to avoid conflicts.)

> I guess my ignorance in the 'c' programming arena is showing....

You should read a good C book. Check the archives of this list for
suggestions.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to