This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pas besoin de redéfinir les méthodes __init__ et __repr__ puisqu'elles sont déjà définies dans Exception | |
class ErrDeg(Exception) : | |
pass | |
#Ou alors pour leur donner un fonctionnement supplémentaire | |
class ErrDeg(Exception): | |
def __init__(self, deg1, deg2): | |
self.value = str(deg1)+" != "+str(deg2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Solution 1: getSubTree renvoie un pointeur sur pointeur sur arbre, | |
autrement dit, l'adresse du pointeur sur le sous-arbre gauhe de l'objet. | |
A éviter, puisqu'on permet d'écrire dans un atttribut privé. */ | |
Tree **Tree::getSubTreeL(){ | |
return &(this->leftChild); | |
} | |
/* Solution 2: implémenter un setter, à préferer */ | |
void Tree::setSubTreeL(Tree *child){ | |
this->leftChild = child; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
negative: | |
MOV EBX, [ESP+8] | |
MOV ECX,[ESP+12]; je suppose que ESP a récupéré les paramètres donnés en c++ | |
MOVZX AX, EBX; comme je comprends rien, je place la valeur du registre AX => ECX | |
boucle : | |
MOV AX, [A+ECX*2-2]; je suppose que ça lit la matrice et que je place le NOT(mat[i][j]) | |
NOT AX | |
LOOP boucle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" void fonction(char **img, int m, int n); | |
char **M = new char *[m]; | |
for (int i=0;i<m;i++) | |
{ | |
M[i] = new char [n]; | |
} | |
fonction(M, m, n); |