Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
4803 connectés 

  FORUM HardWare.fr
  Programmation
  C++

  [Visual C++] Classes filles de CException

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[Visual C++] Classes filles de CException

n°1166771
morgan541
Posté le 01-08-2005 à 14:38:54  profilanswer
 

Bonjour,
 
Quand on définit une classe fille de CException, doit-on faire quelques chose de spécial dans le code ou settings du projets?
car erreur de build ci-dessous:

Code :
  1. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(5) : error C2504: 'CException' : base class undefined
  2. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(7) : error C2143: syntax error : missing ';' before 'public'
  3. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(17) : error C2061: syntax error : identifier 'CString'
  4. NbpValidationDispatcher.cpp
  5. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(5) : error C2504: 'CException' : base class undefined
  6. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(7) : error C2143: syntax error : missing ';' before 'public'
  7. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(17) : error C2061: syntax error : identifier 'CString'
  8. SeException.cpp
  9. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(5) : error C2504: 'CException' : base class undefined
  10. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(7) : error C2143: syntax error : missing ';' before 'public'
  11. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.h(17) : error C2061: syntax error : identifier 'CString'
  12. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.cpp(20) : error C2061: syntax error : identifier 'CException'
  13. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.cpp(22) : error C2143: syntax error : missing ';' before 'tag::id'
  14. D:\MORGAN\C++\ValidationCOMObject\SRC\COM\TotoValidationCOm\SeException.cpp(22) : fatal error C1004: unexpected end of file found


 
Merci.

mood
Publicité
Posté le 01-08-2005 à 14:38:54  profilanswer
 

n°1166823
HelloWorld
Salut tout le monde!
Posté le 01-08-2005 à 15:01:26  profilanswer
 

Tu as créé un projet MFC ? Tu as inclus quelque chose ?


---------------
FAQ fclc++ - FAQ C++ - C++ FAQ Lite
n°1166833
morgan541
Posté le 01-08-2005 à 15:04:20  profilanswer
 

Non c'est un ATL Project.
 
Une classe SeException dérivant de CException  a été créée  
ce n'est pas moi à l'origine de cela.
MAis dans le projet initial cela compile
et dans mon projet il y a les erreurs du dessus
Donc j'ai surement du oublier quelque chose mais je ne sais pas quoi

n°1166840
HelloWorld
Salut tout le monde!
Posté le 01-08-2005 à 15:07:40  profilanswer
 

#include <stdafx.h> ?


---------------
FAQ fclc++ - FAQ C++ - C++ FAQ Lite
n°1166844
slash33
Posté le 01-08-2005 à 15:09:36  profilanswer
 

CException fait partie des MFC. Comment veux-tu t'en sortir sans inclure les entêtes afx?
 
exception est la classe qui gère les exceptions hors MFC.

n°1166845
morgan541
Posté le 01-08-2005 à 15:10:21  profilanswer
 

c dans le cpp
en fait j'ai fait un copier/coller de l'original(qui est build)

n°1166852
slash33
Posté le 01-08-2005 à 15:13:53  profilanswer
 

stdafx.h est un entête qui en inclus d'autres.
Si ton projet n'utilises pas les MFC, comment veux tu que stdafx.h appelle les entête afx.
 
Au minimum le stdafx.h d'un projet MFC fait l'include de <afxwin.h> et <afxext.h>

n°1166868
morgan541
Posté le 01-08-2005 à 15:22:35  profilanswer
 

on ne peut pas le spécifier quelque part l'appel à des MFC?

n°1166891
HelloWorld
Salut tout le monde!
Posté le 01-08-2005 à 15:35:05  profilanswer
 

oui, dans un fichier d'en-tête...


---------------
FAQ fclc++ - FAQ C++ - C++ FAQ Lite
n°1166918
morgan541
Posté le 01-08-2005 à 15:55:30  profilanswer
 

c'est bon je les ai inclus
It's ok
 
Merci à vous 2


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  [Visual C++] Classes filles de CException

 

Sujets relatifs
[Visual C++/MFC] Femeture boite de dialogueprob acces membres de classes pour fichier inclus en path absolu
[Visual C++/MFC] Onglets[Visual C++/MFC] Creation dynamique
[Visual C++/MFC] RichEdit?[Visual C++/MFC] Boite de dialogue
[visual C++]ZIP[Visual C++] Comment changer le répertoire courant ?
Visual Editor pour EclipseVisual Studio 2005 Beta 2
Plus de sujets relatifs à : [Visual C++] Classes filles de CException


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)