I want to free memory after using an object ('ii', in the following program) in c++:
#include <iostream>
#include <armadillo>
using namespace std;
using namespace arma;
int main()
{
cx_mat ii(2,2,fill::eye);
cout << ii <<endl;
free (ii);
return 0;
}
But after compiling, I encounter to the following error:
error: cannot convert ‘arma::cx_mat {aka arma::Mat<std::complex<double> >}’ to ‘void*’ for argument ‘1’ to ‘void free(void*)’
can any body guide me?