I have a function defined in the Header of my .dll
void calculo(vector A, vector B, double &Ans1, double jj);
in t
Try add standard parameter value to function pointer type declaration:
typedef void(_stdcall *f_funci)(vector A, vector B, double &Ans1, double jj = 36.5);
Default argument value is part of function signature, compiler does not put it into function code.
Default arguments:
Are only allowed in the parameter lists of function declarations
If you don't want to default the argument in the header you could accomplish what you're trying to do by overloading the function:
void calculo(const vector<double>& A, const vector<int>& B, double &Ans1, const double jj);
void calculo(const vector<double>& A, const vector<int>& B, double &Ans1) { calculo(A, B, Ans1, 36.5); }
As a bonus comment, please pass vector
s by constant reference as passing by value incurs the potentially expensive copy cost.