As my knowledge about C++
you can not assign a value to a class member in class declaration ( like Java language), you should do this in constructor
int ID_counter = 0;
and
int numstrlevelcounter=0;
UPDATE:
you've declared class AddMarkOne
which refers to StudentonatorDialog
and declare class StudentonatorDialog
which refers to AddMarkOne
. It seems there is a loop here. and with this loop you can not be able to solve this problem. My suggestion is to refine your main architecture, inheritance and polymorphism
Your #include
statements must have this pattern:
1. First more abstract class include statement then inherited class include statements
2. In your more abstract class you should not refer to inherited classes.
3. Your inheritance chain must be some thing like a tree (which is without any loops) as your include statements