/in/compound.cpp: In member function 'double Compound::calculateMolarMass()':
/in/compound.cpp:6:1: error: no return statement in function returning non-void [-Werror=return-type]
}
^
/in/compound.cpp: In constructor 'Compound::Compound(int*, int)':
/in/compound.cpp:14:23: error: ISO C++ forbids variable length array 'inputarray' [-Werror=vla]
int inputarray[num], rec;
^
/in/compound.cpp:16:27: error: ISO C++ forbids variable length array 'elements' [-Werror=vla]
string elements[elmnum];
^
/in/compound.cpp:17:19: error: incompatible types in assignment of 'int' to 'int [num]'
inputarray = *arr;
^~~
/in/compound.cpp:22:32: error: invalid use of member function 'int Element::getAtomicNumber() const' (did you forget the '()' ?)
if (allElem[j].getAtomicNumber == inputarray[i]) {
~~~~~~~~~~~^~~~~~~~~~~~~~~
/in/compound.cpp:23:46: error: invalid use of non-static member function 'std::__cxx11::string Element::getSymbol() const'
elements[p] = allElem[j].getSymbol;
^~~~~~~~~
In file included from /in/compound.cpp:2:0:
/in/compile/compound.h:18:16: note: declared here
string getSymbol() const {return symbol;}
^~~~~~~~~
/in/compound.cpp:14:26: error: unused variable 'rec' [-Werror=unused-variable]
int inputarray[num], rec;
^~~
/in/compound.cpp: In member function 'std::__cxx11::string Compound::toString()':
/in/compound.cpp:32:1: error: no return statement in function returning non-void [-Werror=return-type]
}
^
cc1plus: all warnings being treated as errors