PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.cplus > standard header
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
standard header

Réponse
 
LinkBack Outils de la discussion
Vieux 08/04/2008, 10h02   #1
disinfo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut standard header

hello,
I am refactoring a c++ project and I found an header file full of
implemented classes.
I was wandering if is this right or if there could be a better standard
like:

1. Creating different header file for each class that was implemented.

2. Put on a single header file just the definition of all the implemented
classes and then use a single .cpp file to implement all of them.

3. Create a different header file for each implemented class and put
there only the declaration, while implemetation on many cpp file as many
are the classe/hederfile.

Unfortunally I am quite confused about all that....

Any will be very appreciate

Thanks

Disinfo
  Réponse avec citation
Vieux 08/04/2008, 10h05   #2
Ian Collins
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: standard header

disinfo wrote:
> hello,
> I am refactoring a c++ project and I found an header file full of
> implemented classes.
> I was wandering if is this right or if there could be a better standard
> like:
>
> 1. Creating different header file for each class that was implemented.
>
> 2. Put on a single header file just the definition of all the implemented
> classes and then use a single .cpp file to implement all of them.
>
> 3. Create a different header file for each implemented class and put
> there only the declaration, while implemetation on many cpp file as many
> are the classe/hederfile.
>
> Unfortunally I am quite confused about all that....
>

3) will probably make your life and the lives of those who follow you a
lot easier.

--
Ian Collins.
  Réponse avec citation
Vieux 08/04/2008, 10h18   #3
disinfo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: standard header

Il Tue, 08 Apr 2008 21:05:41 +1200, Ian Collins ha scritto:

>3) will probably make your life and the lives of those who follow you a
>lot easier.


lol

Thank you a lot Ian!

Just to be sure I make an example
If I have an header and some .cpp file
and on the header file I 've 5 classes implemented, now I'll create 5 new
header file(one for each classes) just with the classes definition
and other 5 .cpp files where I'll implement the
definition. Am I right?

Thanks again

Disinfo
  Réponse avec citation
Vieux 08/04/2008, 16h02   #4
Abhishek Padmanabh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: standard header

On Apr 8, 2:18pm, disinfo <spikeh...@katamail.com> wrote:
>
> Just to be sure I make an example
> If I have an header and some .cpp file
> and on the header file I 've 5 classes implemented, now I'll create 5 new
> header file(one for each classes) just with the classes definition
> and other 5 .cpp files where I'll implement the
> definition. Am I right?


Yes.
  Réponse avec citation
Vieux 08/04/2008, 17h24   #5
disinfo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: standard header

Il Tue, 08 Apr 2008 08:02:25 -0700, Abhishek Padmanabh ha scritto:

> On Apr 8, 2:18Âpm, disinfo <spikeh...@katamail.com> wrote:
>>
>> Just to be sure I make an example
>> If I have an header and some .cpp file and on the header file I 've 5
>> classes implemented, now I'll create 5 new header file(one for each
>> classes) just with the classes definition and other 5 .cpp files where
>> I'll implement the definition. Am I right?

>
> Yes.



thank you!
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h22.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09046 seconds with 13 queries