void MainFrame::SurClicEditerVariable( wxRibbonButtonBarEvent& event ) { if(m_arbreVariables->GetFocusedItem() == m_arbreVariables->GetRootItem()) return; char nomVariableAEditer = m_arbreVariables->GetItemText(m_arbreVariables->GetFocusedItem())[0]; AjoutMatriceDialogue modifierMatrice(this, &m_conteneurVariables, nomVariableAEditer); modifierMatrice.ShowModal(); }
//Programme principal int main() { int i; int **matrice; matrice = malloc(TAILLE*sizeof(int*)); for (i = 0; i < TAILLE; ++i) matrice[i] = malloc (sizeof(int)*TAILLE); //Il faudrait vérifier si l'allocation dynamique s'est bien déroulée srand (time(NULL)); printf("Bienvenue dans le Jeu De La Vie ! Appuyez sur 'Entrer' pour commencer...\n"); getchar(); initialiser(matrice); printf("La population au départ : \n"); afficher(matrice); printf("\nPressez sur ENTER pour continuer...\n"); getchar(); for(i=0; i<CYCLE; i++) { modifierMatrice(matrice); printf("La population après %d cycles: \n",i+1); afficher(matrice); printf("Pressez sur ENTER pour continuer...\n"); getchar(); } printf("Nombre de cycle terminé\n"); return 0; }