9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] could plan9 run on PC?
@ 2000-05-04 15:50 Tom
  0 siblings, 0 replies; 3+ messages in thread
From: Tom @ 2000-05-04 15:50 UTC (permalink / raw)


On May 4,  9:53am, xutao@ee.cornell.edu wrote:
> BTW, another question, Rob Pike in his C programming style said that
> "include files should never include include files"
>
> but how if I met following problem?
>
> I had two classes, wishing to each class has its own head files,
> while one class declares another class as one of its member. so it seems
> unavoidable to include one class header file in another class's head file.

In your program, write:

#include <class-a.h>
#include <class-with-class-a-member.h>

In the documentation for class-with-class-a-member, write:
	You must include class-a.h before class-with-class-a-member.h

Your compiler will tell you when you get it wrong.

--
Tom Duff.  Telepathic jazz musicians sometimes communicate without
language.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] could plan9 run on PC?
@ 2000-05-04 16:48 Tom
  0 siblings, 0 replies; 3+ messages in thread
From: Tom @ 2000-05-04 16:48 UTC (permalink / raw)


On May 4,  9:53am, xutao@ee.cornell.edu wrote:
> BTW, another question, Rob Pike in his C programming style said that
> "include files should never include include files"
>
> but how if I met following problem?
>
> I had two classes, wishing to each class has its own head files,
> while one class declares another class as one of its member. so it seems
> unavoidable to include one class header file in another class's head file.

In your program, write:

#include <class-a.h>
#include <class-with-class-a-member.h>

In the documentation for class-with-class-a-member, write:
	You must include class-a.h before class-with-class-a-member.h

Your compiler will tell you when you get it wrong.

--
Tom Duff.  Telepathic jazz musicians sometimes communicate without
language.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] could plan9 run on PC?
@ 2000-05-04  9:53 xutao
  0 siblings, 0 replies; 3+ messages in thread
From: xutao @ 2000-05-04  9:53 UTC (permalink / raw)


I was told that plan9 was likely to release soon as open sourse OS.
I am a fan of unix(linux),heard of Rob Pike's saying about dead unix.
I just wonder the hardware requirement of plan9, whether it is possible to
install it on my PC? waiting to see what does plan9 offer to take the place
unix(IMO, the best Programmers' OS).

thanks

BTW, another question, Rob Pike in his C programming style said that
"include files should never include include files"

but how if I met following problem?

I had two classes, wishing to each class has its own head files,
while one class declares another class as one of its member. so it seems
unavoidable to include one class header file in another class's head file.

I feel sorry if the problem is too stupid. I am just a student, and met
the problem in implementing codes.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-04 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-04 15:50 [9fans] could plan9 run on PC? Tom
  -- strict thread matches above, loose matches on Subject: below --
2000-05-04 16:48 Tom
2000-05-04  9:53 xutao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).