|
|
Invisible wrote:
> 1. How does it know which files depend on which other files?
Trivially, it compiles the file and sees which other files it opens during
the compilation. With GCC, you can even give a command-line parameter to
generate a makefile from the compilation. (-M or some such)
> 2. A header file is what defines what can be accessed from outside a
> given source file. Without a header file, how do you determine what's
> supposed to be public and what isn't?
No. You're thinking that header files are part of the language or something.
It's just a convention. If you're accessing something outside of the file
you're compiling, you declare it "extern". It's convenient to put the
"externs" in a separate files, but it isn't necessary.
> (C is a lot simpler, it's
> just astonishingly easy to shoot yourself in the foot with it.)
Yes. Maybe you should try something intermediary first, like C# or Java or
Pascal or some such.
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
|