Re: organising classes c++
From: Jason (jason.carney1_at_btinternet.com)
Date: 11/20/03
- Next message: Mike Wahler: "Re: Top ten errors"
- Previous message: Jason: "Re: organising classes c++"
- In reply to: Jason: "organising classes c++"
- Next in thread: Josh Sebastian: "Re: organising classes c++"
- Reply: Josh Sebastian: "Re: organising classes c++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 19 Nov 2003 23:26:37 +0000 (UTC)
jsut one other point. when you include a file say A into file B, do the
include statements of file A also take effect in file B?
thanks again.
"Jason" <jason.carney1@btinternet.com> wrote in message
news:bpgrp5$970$1@sparta.btinternet.com...
> hello,
>
> How do I organise my classes in c++? At the moment I have something like
> this in a .cpp file
>
> class classname { //class definition
> private:
> //...
> public:
> //...stuff
> char getchar();
> }
>
> char classname::classname getchar() {
> return anyhing;
> }
>
> and then in a separate header file I placed a copy of the class
definition -
> obviously not the function implementations.
>
> Is that how classes make their interfaces known to other classes so a
class
> in another file just includes <"classname.h">. Must I have a separate
> header file to the main .cpp file in order to create associations? Does
the
> main .cpp file have to include the class definition here and in the header
> file? When you have lots of classes how do most c++ programmers organise
> them, just as described or different?
>
> I would be grateful for any comments as I just want to be clear on these
> points.
>
> Thanks in advance for your help :)
>
>
>
- Next message: Mike Wahler: "Re: Top ten errors"
- Previous message: Jason: "Re: organising classes c++"
- In reply to: Jason: "organising classes c++"
- Next in thread: Josh Sebastian: "Re: organising classes c++"
- Reply: Josh Sebastian: "Re: organising classes c++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|