本文介绍了全局变量余额计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好......

有人可以帮我解决这个问题吗?

i我的申请中有这个代码:

卡片创建
/ * * /

typedef struct card

{

等等

}卡;

typedef卡* PtrCrt;


/ *用于创建转换* /

typedef struct trans

{

等等

} Trans;

typedef Trans * PtrTrans;


我需要计算每张卡的余额以及如何将此验证

放在一个函数中?!

Hello everyone...
Anybody can help me on this question, please?
i′ve this code in my application:

/*for Card creation*/
typedef struct card
{
etc,etc
} Card;
typedef Card *PtrCrt;

/*For trans creation*/
typedef struct trans
{
etc,etc
} Trans;
typedef Trans *PtrTrans;

I need to calculate the Balance of every card and how put this verification
in one function?!

推荐答案



int balance(const Card * c)

{

int result;

/ *计算* /

返回结果;

}


int main(无效)

{

卡c = {/ *等* /};

printf(" balance =%d \ n",余额(& c) );

返回0;

}


如需更具体的建议,请询问更具体的问题。


-Mike

int balance(const Card *c)
{
int result;
/* calculate */
return result;
}

int main(void)
{
Card c = { /* etc. */ };
printf("balance = %d\n", balance(&c));
return 0;
}

For more specific advice, ask more specific questions.

-Mike




请更具体。卡的余额是多少?你需要验证什么?b $ b需要验证?你是如何表示卡的聚合的?

作为一个数组?一个单链表?许多单链表?


PS



自扩展阵列。 (这是你的大学教授的代码

警告过你。):) :) :)

Please be more specific. What is the balance of a card? What do you
need to verify? How are you representing the aggregation of cards?
As an array? A singly-linked list? Many singly-linked lists?

P.S.

http://www.nls.net/mp/413/sea.ZIP

Self-expanding arrays. (This is the code your college professor
warned you about.) :) :) :)




请更具体一点。卡的余额是多少?你需要验证什么?b $ b需要验证?你是如何表示卡的聚合的?

作为一个数组?一个单链表?许多单链表?


PS



自扩展阵列。 (这是你的大学教授的代码

警告过你。):) :) :)


Please be more specific. What is the balance of a card? What do you
need to verify? How are you representing the aggregation of cards?
As an array? A singly-linked list? Many singly-linked lists?

P.S.

http://www.nls.net/mp/413/sea.ZIP

Self-expanding arrays. (This is the code your college professor
warned you about.) :) :) :)



这篇关于全局变量余额计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 04:43