"Code prêt à coller dans un compilateur C++""


Je ne comprend pas pourquoi le while n'est pas respecté, je devrais sortir au bout du troisième passage.


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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <stdio.h> 
#include <stdlib.h> 
#include <string.h> 
#include   <cstring> 
#include <iostream>
#include   <cstdlib> 
#include <string> 
using namespace std;
 
int main()
{ 
     string mot;
     int ii; 
     int a;
     int b;
     int c;
 
     a =0;
     b =0;
     c =0;
 
     int taille;
 
     string chaine;
     chaine = "abc";
 
     taille = chaine.length();
 
     string t1[taille];
     string t2[taille];
     string t3[taille];
 
 
         for (ii=0; ii<taille; ii++)
 
      {
                t1[ii] = chaine.substr(ii,1);
                t2[ii] = chaine.substr(ii,1);
                t3[ii] = chaine.substr(ii,1);
 
                                                          }
 
       while (b<taille)
 
          {
 
            for (a =0; a < taille; a++ )  
 
             {
                      cout<<t1[c] <<t2[b]<<t3[a]<<endl;
 
 
                         if (a == taille) 
 
                         {
                                a = 0;
                                b++;
                                break;  
                                              }
 
 
                                                       }
 
 
                                                               }
 
 
 system("PAUSE");
    return EXIT_SUCCESS;
 
}