IdentifiantMot de passe
Loading...
Mot de passe oubli� ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les r�ponses en temps r�el, voter pour les messages, poser vos propres questions et recevoir la newsletter

C++ Discussion :

does not give a valid preprocessing token


Sujet :

C++

  1. #1
    Membre �clair� Avatar de vdumont
    Profil pro
    �tudiant
    Inscrit en
    F�vrier 2006
    Messages
    510
    D�tails du profil
    Informations personnelles :
    �ge : 39
    Localisation : Canada

    Informations professionnelles :
    Activit� : �tudiant

    Informations forums :
    Inscription : F�vrier 2006
    Messages : 510
    Par d�faut does not give a valid preprocessing token
    Je compile des fichiers sous gcc 3.4.2 et jobtient la meme erreur a MAINTE reprise

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
     
    m3d_c_bd.cpp:63:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:63:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:63:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:63:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:84:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:84:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:84:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:84:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:124:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:124:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:124:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_bd.cpp:124:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:368:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:368:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:368:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:368:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:524:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:524:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:524:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_c_mai.cpp:524:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_erreur.cpp:13:2: warning: no newline at end of file
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:75:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:152:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:152:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:152:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:157:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:157:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:157:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_front.cpp:157:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_g_noe.cpp:61:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_g_noe.cpp:92:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_g_noe.cpp:122:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_g_noe.cpp:315:1: pasting ")" and "->" does not give a valid preprocessing token
    m3d_if_oct.cpp:34:1: pasting ")" and "->" does not give a valid preprocessing token


    Les 2 types derreur reviennent toujours au 2 meme instructions
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
     
    INSERER_TETE_LISTE(front,fin,face) // ligne 63
    SUPPRIMER_LISTE(face,tab_front[2*num_essai],tab_front[2*num_essai+1],face)


    Ils sont definis de la facon suivante

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
    #define INSERER_TETE_LISTE(tete,fin,entite)\
    PREC(entite) = NULL ;\
    if (tete != NULL) {\
    /* la queue est inchangee */\
    	SUIVANT(entite) = tete ;\
    	PREC(tete) = entite ;\
    	tete = entite ;\
    }\
    else {\
    	SUIVANT(entite) = NULL ;\
    	tete = entite ;\
    	fin = entite ;\
    }

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
     
    #define SUPPRIMER_LISTE(type,tete,fin,entite)\
    {\
    	struct mknom(st_,type) *pcourant, *scourant ;\
    	pcourant = PREC(entite) ;\
    	scourant = SUIVANT(entite) ;\
    	if (pcourant== NULL) {\
    		if (scourant == NULL) {	\
    			PREC(entite) =  NULL ;\
    			SUIVANT(entite) = NULL ;\
    			tete =  NULL ;\
    			fin =  NULL ;\
    		}\
    		else {\
    		scourant->prec = NULL ;\
    		PREC(entite) =  NULL ;\
    		SUIVANT(entite) = NULL ;\
    		tete = scourant ;\
    		}\
    	}\
    	else {\
    		if (scourant == NULL) \
    		{pcourant->suivant = NULL ;\
    		PREC(entite) =  NULL ;\
    		SUIVANT(entite) = NULL ;\
    		fin = pcourant  ;}\
    		else {pcourant->suivant = scourant ;\
    		scourant->prec = pcourant ;\
    		PREC(entite) =  NULL ;\
    		SUIVANT(entite) = NULL ;}\
    	}\
    }

    Je comprend absolument rien du preprocessing token dont ils parlent??

  2. #2
    Membre Expert
    Avatar de Pragmateek
    Homme Profil pro
    Formateur expert .Net/C#
    Inscrit en
    Mars 2006
    Messages
    2 635
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 39
    Localisation : France, Val de Marne (�le de France)

    Informations professionnelles :
    Activit� : Formateur expert .Net/C#
    Secteur : Conseil

    Informations forums :
    Inscription : Mars 2006
    Messages : 2 635
    Par d�faut
    Inliner la fonction reviendrait pas au m�me que la remplacer par cette macro tout en �vitant ce genre de surprise?

  3. #3
    Expert confirm�

    Inscrit en
    Novembre 2005
    Messages
    5 145
    D�tails du profil
    Informations forums :
    Inscription : Novembre 2005
    Messages : 5 145
    Par d�faut
    Tu utilises une macro qui utilise ## de maniere abusive.

  4. #4
    Membre �clair� Avatar de vdumont
    Profil pro
    �tudiant
    Inscrit en
    F�vrier 2006
    Messages
    510
    D�tails du profil
    Informations personnelles :
    �ge : 39
    Localisation : Canada

    Informations professionnelles :
    Activit� : �tudiant

    Informations forums :
    Inscription : F�vrier 2006
    Messages : 510
    Par d�faut
    Hum lerreur devrait donc venir de mes PREC et SUIVANT

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
     
    #define PREC(entite) mknom((entite),->prec)
    #define SUIVANT(entite) mknom((entite),->suivant)
    Qui elle utilise mknom

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
     
    #define mknom(a,b) a##b

    Et la il aime pas mon ##....

  5. #5
    Expert confirm�

    Inscrit en
    Novembre 2005
    Messages
    5 145
    D�tails du profil
    Informations forums :
    Inscription : Novembre 2005
    Messages : 5 145
    Par d�faut
    Citation Envoy� par vdumont
    Hum lerreur devrait donc venir de mes PREC et SUIVANT

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
     
    #define PREC(entite) mknom((entite),->prec)
    #define SUIVANT(entite) mknom((entite),->suivant)
    Qui elle utilise mknom

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
     
    #define mknom(a,b) a##b

    Et la il aime pas mon ##....
    Pourquoi PREC appelle mknom? mknom essaye de faire un symbole a partir de deux, ici tu lui en passe une floppee d'une part, et d'autre part tu passes des symboles qui ne peuvent pas faire un seul symbole s'ils sont juxtaposes.

  6. #6
    Membre �clair� Avatar de vdumont
    Profil pro
    �tudiant
    Inscrit en
    F�vrier 2006
    Messages
    510
    D�tails du profil
    Informations personnelles :
    �ge : 39
    Localisation : Canada

    Informations professionnelles :
    Activit� : �tudiant

    Informations forums :
    Inscription : F�vrier 2006
    Messages : 510
    Par d�faut
    Je ne suis pas lauteur du logiciel mais jimagine que cest pour obtenir comme resultat:


    face->prec, dans le cas ou entite = face

    Est-ce quil serait plus approprie de faire

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    #define PREC(entite) entite##->prec
    ?


    EDIT: Memes erreurs

  7. #7
    Expert confirm�

    Inscrit en
    Novembre 2005
    Messages
    5 145
    D�tails du profil
    Informations forums :
    Inscription : Novembre 2005
    Messages : 5 145
    Par d�faut
    Citation Envoy� par vdumont
    Je ne suis pas lauteur du logiciel mais jimagine que cest pour obtenir comme resultat:


    face->prec, dans le cas ou entite = face

    Est-ce quil serait plus approprie de faire

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    #define PREC(entite) entite##->prec
    ?


    EDIT: Memes erreurs
    Mais pourquoi vouloir fusionner des symboles? Moi je ferais simplement:

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    #define PREC(entite) (entite)->prec

  8. #8
    Membre �clair� Avatar de vdumont
    Profil pro
    �tudiant
    Inscrit en
    F�vrier 2006
    Messages
    510
    D�tails du profil
    Informations personnelles :
    �ge : 39
    Localisation : Canada

    Informations professionnelles :
    Activit� : �tudiant

    Informations forums :
    Inscription : F�vrier 2006
    Messages : 510
    Par d�faut
    Woah javais pas penser a ca du tout

    Merci beaucoup, je ten doit une!

+ R�pondre � la discussion
Cette discussion est r�solue.

Discussions similaires

  1. does not give a valid preprocessing token
    Par DarKaa dans le forum C++
    R�ponses: 2
    Dernier message: 10/07/2012, 10h08
  2. R�ponses: 2
    Dernier message: 31/03/2011, 17h31
  3. [W3C] Pb document type does not allow element "BODY" here W3C validator
    Par megapacman dans le forum Balisage (X)HTML et validation W3C
    R�ponses: 3
    Dernier message: 22/06/2006, 13h42
  4. [macros] "does not give a valid preprocessing token&quo
    Par Emmanuel Delahaye dans le forum C
    R�ponses: 8
    Dernier message: 24/09/2004, 21h57
  5. ... does not give a valid preprocessing token
    Par fredoun dans le forum CORBA
    R�ponses: 1
    Dernier message: 17/05/2004, 09h46

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo