1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
char upmove( double *, char, double);
char dnmove(double *, char, double);
int main()
{
if(flag=='U')
{
upmove(&(s[i]), flag,up);
}
else
{
dnmove(&(s[i], flag, dn);
}
return 0;
}
char upmove(double *sptr, char uflag, double ut)
{
ut=*sptr; //basically, I want to assign 'ut' the value of s[i] - is this even a correct way of doing it?
uflag='U';//I want to update uflag to 'U'
return ??? I want to return the uflag and ut back to the main function, how do I do that?
}
char dnmove(double *sptr, char dflag, double dt)
{
dt=*sptr; //basically, I want to assign 'dt' the value of s[i] - is this even a correct way of doing it?
dflag='D';//I want to update dflag to 'D'
return ??? here, I want to return the dflag and dt back to the main function, just like in upmove??
}
|