Ho tolto il .h ed ho inizializzato le due variabili materia e materie a 0.
codice:
classe.cpp:6: error: ISO C++ forbids initialization of member ‘materie’
classe.cpp:6: error: making ‘materie’ static
classe.cpp:6: error: ISO C++ forbids in-class initialization of non-const static member ‘materie’
classe.cpp:6: error: ISO C++ forbids initialization of member ‘materia’
classe.cpp:6: error: making ‘materia’ static
classe.cpp:6: error: ISO C++ forbids in-class initialization of non-const static member ‘materia’
classe.cpp:7: error: array bound is not an integer constant
classe.cpp: In member function ‘float alunno::GetMedia()’:
classe.cpp:10: error: expected initializer before ‘+=’ token
classe.cpp:11: error: ‘media’ was not declared in this scope
classe.cpp: In member function ‘float alunno::TotalMedia()’:
classe.cpp:17: error: expected initializer before ‘+=’ token
classe.cpp:19: error: ‘mediaTot’ was not declared in this scope
classe.cpp: In function ‘int main()’:
classe.cpp:38: error: ‘class alunno’ has no member named ‘matrice’
classe.cpp:40: error: ‘GetMedia’ was not declared in this scope