1 like 0 dislike

假設遊戲中的所有角色共同擁有的資訊包含:名稱(char:16)、X/Y座標(float),玩家的角色除了上述的資料外,還包含了生命值與魔法值。先定義儲存共同角色的資訊的結構 CharacterInfo,然後再定義儲存玩家角色的結構 PlayerInfo,並以 CharacterInfo 定義角色名稱與座標。設計一個程式,完成所需要的結構宣告,並在主程式完成 player 結構變數的宣告,設定初始值為角色名稱 Angel 在 (5,3) 的位置,生命與魔法值各為 100 與 500。

 

參考書籍:旗標無痛學習教本

[Normal] Essay (Open question) - asked in Introduction to Computer Programming I (C) by (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 4 views
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.78.220
©2016-2019

Related questions

2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 11, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 5 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 11, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 2 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 11, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 2 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 11, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 2 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 4 views
8,201 questions
63,042 answers
35,691 comments
1,343 users