Passing argument... incompatible pointer type[enabld by default]
Résolu
sabirab2
Messages postés
9
Statut
Membre
-
sabirab2 Messages postés 9 Statut Membre -
sabirab2 Messages postés 9 Statut Membre -
Bonjour chers Programmeurs,
Bref je sais pas d'où vient le problème Si vous pouvez m'aider
merciii d'avance
Les erreurs :
attention : passing argument 1 of 'ajoutNode' from incompatible pointer type [enabled by default]
note: expected 'struct arbre *' but argument is of type 'struct node *'
: attention : assignment from incompatible pointer type [enabled by default]
attention : passing argument 1 of 'ajoutNode' from incompatible pointer type [enabled by default]
note: expected 'struct arbre *' but argument is of type 'struct node *'
: attention : assignment from incompatible pointer type [enabled by default]
Bref je sais pas d'où vient le problème Si vous pouvez m'aider
merciii d'avance
#include<stdio.h>
#include<stdlib.h>
//******************************* LA STRUCTURE de l'arbre ************************************
typedef struct Arbre
{
unsigned int key;
struct node *gauche;
struct node *droite;
}arbre ;
//******************************* Creation Noeud *****************
arbre * CreatNode(unsigned int val)
{
arbre *node =(arbre*)malloc(sizeof(arbre));
node->key = val;
node->gauche = NULL;
node->droite = NULL;
}
//******************************* INSERTION *********************
arbre * ajoutNode(arbre *tree,arbre* node)
{
if(tree==NULL) return node;
if(node->key<tree->key)
tree->gauche=ajoutNode(tree->gauche,node );
else
tree->droite=ajoutNode(tree->droite,node);
return tree;
}
//**************************** MAIN() ******************************
main()
{
arbre *A=NULL,*N_node=CreatNode(10);
ajoutNode(A,N_node);
}
Les erreurs :
attention : passing argument 1 of 'ajoutNode' from incompatible pointer type [enabled by default]
note: expected 'struct arbre *' but argument is of type 'struct node *'
: attention : assignment from incompatible pointer type [enabled by default]
attention : passing argument 1 of 'ajoutNode' from incompatible pointer type [enabled by default]
note: expected 'struct arbre *' but argument is of type 'struct node *'
: attention : assignment from incompatible pointer type [enabled by default]
A voir également:
- Passing argument... incompatible pointer type[enabld by default]
- Clear type - Guide
- Incompatibilité de type vba ✓ - Forum Programmation
- Shoes by iara - Forum Consommation & Internet
- By click downloader avis - Forum Enregistrement / Traitement audio
- %Localappdata%\google\chrome\user data\default ✓ - Forum Google Chrome