1 like 0 dislike
138 views

假設遊戲中的所有角色共同擁有的資訊包含:名稱(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)
ID: 21898 - Available when: Unlimited - Due to: Unlimited
| 138 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.71.254.208
©2016-2024

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)
ID: 21900 - Available when: Unlimited - Due to: Unlimited
| 129 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)
ID: 21899 - Available when: Unlimited - Due to: Unlimited
| 118 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)
ID: 21897 - Available when: Unlimited - Due to: Unlimited
| 156 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)
ID: 21896 - Available when: Unlimited - Due to: Unlimited
| 123 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)
ID: 21943 - Available when: Unlimited - Due to: Unlimited
| 127 views
12,783 questions
183,443 answers
172,219 comments
4,824 users