I'm a beginner in c++, and I try to solve a polynomial problem with linked list, when I execute the program it stop executing and a window shows up saying that 'main.exe ceased to function'
what's the problem here ??
class Monome {
public:
// ...
Monome(int cof, int deg) {
// ...
this->suivant = nullptr; // initialise everything in constructor
}
};
class Polynome {
// ...
public:
// ...
~Polynome() {
// you'll need to clean up; call delete on each element in here
}
void ajouter(int a, int b) {
Monome* element = new Monome(a, b);
// add it to your linked list
}
};