If you comment these lines:
inversi(k)= 1.0 / k; //k che va da 1 a 5 in questo caso
quadrati (k)= k*k; //k che va da 1 a 5 in questo caso
your code should compile with a simple:
g++ -Wall -Wextra my_file.cpp
Actually, you can’t assign inexistent variable behind functions.
solved ERROR c++ expected constructor, destructor, or type conversion before ‘(‘ token