Bonjour,
Pouvez-vous m'aider à corriger ces erreurs ?![]()
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 #include<stdio.h> #include<string.h> void chaine(char ch[],int taille) { printf("donner une chaine"); fgets(ch,taille,stdin); ;} void carac(char c1) { printf("donner un caractére"); c1=getchar(); } int nbrocc(char c1,char ch[]) { int nb; nb=0; int i; for(i=0;i<strlen(ch[]);i++) { if (c1==ch[i]) { nb+=1; } return(nb); } } void main() { int x,a; char ch[50]; char c1; chaine(ch,50); carac(c1); a=nbrocc(c1,ch[]); printf("%d",x); }Merci.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 1>c:\users\dell 5110\documents\visual studio 2008\projects\tp9ex5\tp9ex5\ex5.cpp(21) : error C2059: syntax error : ']' 1>c:\users\dell 5110\documents\visual studio 2008\projects\tp9ex5\tp9ex5\ex5.cpp(21) : error C2143: syntax error : missing ';' before ')' 1>c:\users\dell 5110\documents\visual studio 2008\projects\tp9ex5\tp9ex5\ex5.cpp(21) : error C2143: syntax error : missing ';' before ')' 1>c:\users\dell 5110\documents\visual studio 2008\projects\tp9ex5\tp9ex5\ex5.cpp(22) : error C2143: syntax error : missing ';' before '{' 1>c:\users\dell 5110\documents\visual studio 2008\projects\tp9ex5\tp9ex5\ex5.cpp(36) : error C2059: syntax error : ']' 1>Build log was saved at "file://c:\Users\dell 5110\Documents\Visual Studio 2008\Projects\TP9ex5\TP9ex5\Debug\BuildLog.htm" 1>TP9ex5 - 5 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Partager