How would one retreive data input from the keyboard into a dialog box, which the compiler would process at run-time? I thought that making an instance of the class object which contains the data would be enough; but this doesn't cut it. See the following code:
When line **** read
the compiler didn't process the variable m_dWellRad at run-time, but simply used x = 0(initialization). When I used x=2, it used the latter variable.
How then can I make the compiler use the value input from keyboard into my dialog box at run-time?
Code:
void unbound(double *unbd, int nSize)
{
enum{nSize = 100};
double A[nSize],B[nSize],k0[nSize],k1[nSize],s[nSize],expi[nSize],a[nSize],b[nSize];
void bessk0(double *x,double *k0,int nSize);
void bessk1(double *x,double *k1, int nSize);
void ei(double *x, double *expi, int nSize);
double x=0;
s[0] = 1;
a[0] = x*sqrt(s[0]);
b[0] = 2*sqrt(s[0]);
bessk0(a,k0,nSize);
bessk1(a,k1,nSize);
ei(b,expi,nSize);
A[0] = k0[0]/(x*sqrt(s[0])*k1[0]);
B[0] = (1-exp(-2*sqrt(s[0])))/(2*sqrt(s[0]));
unbd[0]=0.5*(A[0]-B[0]-expi[0]);
//trial: K0(x) --> x = rw*sqrt(s), as per A-32
for (int t=1;t<nSize;t++)
{
CKuchukDlg MyClass;
x = 2;//MyClass.m_dWellRad; ****
s[t] = 2*t*PI;
a[t] = x*sqrt(s[t]);
b[t] = 2*sqrt(s[t]);
bessk0(a,k0,nSize);
bessk1(a,k1,nSize);
ei(b,expi,nSize);
A[t] = k0[t]/(x*sqrt(s[t])*k1[t]);
B[t] = (1-exp(-2*sqrt(s[t])))/(2*sqrt(s[t]));
unbd[t]=0.5*(A[t]-B[t]-expi[t]);
}
}
Code:
x=MyClass.m_dWellRad;
How then can I make the compiler use the value input from keyboard into my dialog box at run-time?