#include<cmath> // import cmath
#include <iostream> // import iostream
#include <math.h> // import math.h
int main() {
using namespace std;
struct MyStruct { // class common:
double e;
double b0;
double b1;
double m;
double pt;
double hdn;
double rad0;
double rad30;
double rad60;
//
string du_material;
double du_a;
double du_c0;
double du_c1;
//
string tha_material;
double tha_a;
double tha_c0;
double tha_c1;
//
string tss_material;
double tss_a;
double tss_c0;
double tss_c1;
};
MyStruct common;
common.e = 2.7183;
common.b0 = 0.283;
common.b1 = 0.0656;
common.m = -0.224;
common.pt = 7850; // steel; 7850 kg/m3
common.hdn = 260; // rha; 260 hb
common.rad0 = 1;
common.rad30 = 0.8660254037844387;
common.rad60 = 0.5;
//
common.du_material = "Depleted Uranium";
common.du_a = 0.825;
common.du_c0 = 90;
common.du_c1 = -0.0849;
//
common.tha_material = "Tungsten Heavy Alloy";
common.tha_a = 0.994;
common.tha_c0 = 134.5;\
common.tha_c1 = -0.148;
//
common.tss_material = "Tungsten Self Sharpening";
common.tss_a = 0.825;
common.tss_c0 = 90;
common.tss_c1 = -0.148;
double x = common.du_a;
double y = common.du_c0;
double z = common.du_c1;
double lw;
double d;
double pp;
double v;
int sum(double x, double y, double z, double lw, double d, double v, double pp){ <- error with red under line at curly brackets
int i = x * (1 / (tanh(common.b0 + (common.b1 * (lw / d))))) * (common.rad0 ^ common.m) * sqrt(pp / common.pt) * common.e ^ ((-1 * ((y + (z * common.hdn)) * common.hdn) / pp) / ((v / 1000) ^ 2)) * lw)* common.rad0
return int i
};
cout << "Input length of penetrator: " << endl;
cin >> lw;
cout << "Input diametre of penetrator: " << endl;
cin >> d;
cout << "Input density of penetrator material: " << endl;
cin >> pp;
cout << "Input initial velocity of penetrator: " << endl;
cin >> v;
cout << "Perforation is: " << sum << "mm at" << v << ", angle " << common.rad0 << ".\n" << endl;
return 0;
}

우지챠 분명 맞게 쓴거 같은데 유독 함수 define에서 error가 뜨는레후