存储卡的信息 [英] Storing info for cards
问题描述
大家好,
我有这个任务,我无法理解:
它询问我如何存储信息:
我只想得到小组的意见:
所以这里的问题是:
"
您被要求为卡片玩朋友编写程序。如何使用
存储有关扑克牌的信息?例如,你如何存储某张卡是7颗钻石的事实? (如果你愿意,你可以
使用多个变量)
"
欢迎所有帮助。
提前致谢。
Radith
Radith < RA **** @ xtra.co.nz>在消息中写道
news:11 ********************* @ g49g2000cwa.googlegro ups.com ...大家好,
我有这个任务,我无法理解:
它询问我如何存储信息:
我只是想得到一个意见来自小组:
所以这里有一个问题:
你被要求为卡片玩朋友写一个程序。你如何存储有关扑克牌的信息?例如,你如何存储某张卡是7颗钻石的事实? (如果您愿意,您可以使用多个变量)
欢迎所有帮助。
提前致谢。
Radith
enum适合{CLUBS,HEARTS,DIAMONDS,SPADES};
enum faces {ACE = 1,JACK = 11,QUEEN, KING};
结构卡
{
unsigned int rank;
unsigned char suit;
};
卡c = {7,DIAMONDS};
-Mike
Mike Wahler写道:" Radith" < RA **** @ xtra.co.nz>在消息中写道
新闻:11 ********************* @ g49g2000cwa.googlegro ups.com ...你好全部,
我有这个任务,我无法理解:
它询问我如何存储信息:
我只是想得到小组的意见:
所以这就是问题所在:
你被要求为卡片玩朋友写一个程序。你如何存储有关扑克牌的信息?例如,你如何存储某张卡是7颗钻石的事实? (如果您愿意,您可以使用多个变量)
欢迎所有帮助。
提前致谢。
Radith
enum适合{CLUBS,HEARTS,DIAMONDS,SPADES};
enum faces {ACE = 1,JACK = 11,QUEEN,KING};
<结构卡
{
unsigned int rank;
unsigned char suit;
};
卡片c = {7,DIAMONDS};
struct card c = {7,DIAMONDS);
Robert Gamble
文章< 11 ********************** @ z14g2000cwz.googlegroups .com>,
rg ******* @ gmail.com 说...Mike Wahler写道:" Radith" < RA **** @ xtra.co.nz>在消息中写道
新闻:11 ********************* @ g49g2000cwa.googlegro ups.com ...你好全部,
我有这个任务,我无法理解:
它询问我如何存储信息:
我只是想得到小组的意见:
所以这就是问题所在:
你被要求为卡片玩朋友写一个程序。你如何存储有关扑克牌的信息?例如,你如何存储某张卡是7颗钻石的事实? (如果您愿意,您可以使用多个变量)
欢迎所有帮助。
提前致谢。
Radith
enum适合{CLUBS,HEARTS,DIAMONDS,SPADES};
enum faces {ACE = 1,JACK = 11,QUEEN,KING};
<结构卡
{
unsigned int rank;
unsigned char suit;
};
卡片c = {7,DIAMONDS};
struct card c = {7,DIAMONDS);
Robert Gamble
struct card c = {7,DIAMONDS};
如果你会成为一个挑剔的智者,你最好是正确的。
>
Hi All,
I have got this task which I cant get my head around:
It asks how I would store information:
I just want to get an opinion from the group:
So here''s the question:
"
You have been asked to write a program for a card playing friend. How
would you store information about playing cards? For example how would
you store the fact that a certain card is the 7 of diamonds? (You may
use more than one variable if you wish)
"
All help welcome.
Thanks in advance.
Radith
"Radith" <ra****@xtra.co.nz> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...Hi All,
I have got this task which I cant get my head around:
It asks how I would store information:
I just want to get an opinion from the group:
So here''s the question:
"
You have been asked to write a program for a card playing friend. How
would you store information about playing cards? For example how would
you store the fact that a certain card is the 7 of diamonds? (You may
use more than one variable if you wish)
"
All help welcome.
Thanks in advance.
Radith
enum suits {CLUBS, HEARTS, DIAMONDS, SPADES};
enum faces {ACE = 1, JACK = 11, QUEEN, KING};
struct card
{
unsigned int rank;
unsigned char suit;
};
card c = {7, DIAMONDS};
-Mike
Mike Wahler wrote:"Radith" <ra****@xtra.co.nz> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...Hi All,
I have got this task which I cant get my head around:
It asks how I would store information:
I just want to get an opinion from the group:
So here''s the question:
"
You have been asked to write a program for a card playing friend. How
would you store information about playing cards? For example how would
you store the fact that a certain card is the 7 of diamonds? (You may
use more than one variable if you wish)
"
All help welcome.
Thanks in advance.
Radith
enum suits {CLUBS, HEARTS, DIAMONDS, SPADES};
enum faces {ACE = 1, JACK = 11, QUEEN, KING};
struct card
{
unsigned int rank;
unsigned char suit;
};
card c = {7, DIAMONDS};
struct card c = {7, DIAMONDS);
Robert Gamble
In article <11**********************@z14g2000cwz.googlegroups .com>,
rg*******@gmail.com says...Mike Wahler wrote:"Radith" <ra****@xtra.co.nz> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...Hi All,
I have got this task which I cant get my head around:
It asks how I would store information:
I just want to get an opinion from the group:
So here''s the question:
"
You have been asked to write a program for a card playing friend. How
would you store information about playing cards? For example how would
you store the fact that a certain card is the 7 of diamonds? (You may
use more than one variable if you wish)
"
All help welcome.
Thanks in advance.
Radith
enum suits {CLUBS, HEARTS, DIAMONDS, SPADES};
enum faces {ACE = 1, JACK = 11, QUEEN, KING};
struct card
{
unsigned int rank;
unsigned char suit;
};
card c = {7, DIAMONDS};
struct card c = {7, DIAMONDS);
Robert Gamble
struct card c = {7, DIAMONDS};
If you''re gonna be a nit-picky smart-ass, you better be correct.
这篇关于存储卡的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!