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
#include <stdio.h>
#include <stdlib.h>
 
int main(int argc, char *argv[])
{
    char  choix[1];   
 
    printf("VIEW   : v ou V --> Consulter les informations\n");
    printf("UPDATE : u ou U --> Mettre à jour les informations d'un demandeur\n");
    printf("DELETE : d ou D --> Supprimer un demandeur\n");
    printf("ADD    : a ou A --> Ajouter un demandeur\n");
    printf("SHOW   : s ou S --> Montrer la représentation de l'arbre binaire\n");
 
 
    printf("Commande:");
    scanf("%s",choix);
 
    if (choix = 'v')
     {
                printf("cool");
     }
 
    else if (choix = 'v')
     {
                printf("cool2");
     }
  system("PAUSE");	
  return 0;
}
Lorsque je compile le compilateur DEV C++ me dit qu'il y a des erreurs de compilations

mon programme ne veut pas compiler
je me rapel plus comment on fait

dsl je me suis tromper de prog

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
#include <stdio.h>
#include <stdlib.h>
 
int main(int argc, char *argv[])
{
    char  choix[1];   
 
    printf("VIEW   : v ou V --> Consulter les informations\n");
    printf("UPDATE : u ou U --> Mettre à jour les informations d'un demandeur\n");
    printf("DELETE : d ou D --> Supprimer un demandeur\n");
    printf("ADD    : a ou A --> Ajouter un demandeur\n");
    printf("SHOW   : s ou S --> Montrer la représentation de l'arbre binaire\n");
 
 
    printf("Commande:");
    scanf("%s",choix);
 
    if (choix = 'v')
     {
                printf("cool");
     }
 
    else if (choix = 'u')
     {
                printf("cool2");
     }
     else if (choix = 'd')
     {
                printf("cool3");
     }
    else if (choix = 'a')
     {
                printf("cool4");
     }
    else if (choix = 's')
     {
                printf("cool5");
     }
  system("PAUSE");	
  return 0;
}