how to return tow values in a modularised fountion? in c progam
来源:百度知道 编辑:UC知道 时间:2024/07/07 01:33:44
in c program.
we used to return a value to main fountion.
then how to return tow or more values to main fountion?
thanks a lot
we used to return a value to main fountion.
then how to return tow or more values to main fountion?
thanks a lot
use struct
for example , you want a fuction f return two values:a and b
struct returnTwo
{
int a;
int b;
};
struct returnTwo f()
{
struct returnTwo c
………………
c.a = 1;
c.b = 1;
return c
}
and get values in main by
struct returnTwo d;
d = f();
and now you can use them by
d.a and d.b
why not use a array?
how to return tow values in a modularised fountion? in c progam
Return To Serenity
Return To Innocence 中文歌词
Return to the Sea
翻译Return to Innocence
I don't even know how to spell it
I DIDN’T REALIZE HOW MUCH THIS MEANT TO YOU
I don't know how to stay alive, 是什么意思
HELP ME ! I DON'T KNOW HOW TO DO !!
谁能提供Two-Mix唱的T.R.Y~return to yourself~