Can we call a function inside a routine where the function return data type is void?
For example, I have:
void(temperature, pressure,time)
{
int i;
double results[10];
for (i = 0 ; i <= 9 ; i++)
{
fx(temperature, pressure, time);
results[i]=fx[i];
}
}
(P/S: above is the simplified version of my real problem) fx by itself is of course another ste of codes with equations for calculations that will give results in fx[i].
I was just wondering if I can call another function like that in a开发者_运维百科 'void' function. Just a curious question, Thanks!
Yes you can, as long as you give the outer function a name. (This is C, or similar, right?)
Yes you can, and I am really curious to know why you have this question in your mind because I cannot think of any reason.
精彩评论