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)
ID: 21898 - Available when: Unlimited - Due to: Unlimited
| 102 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:34.204.180.223
©2016-2021

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
| 85 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
| 83 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
| 96 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
| 82 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
| 87 views
11,972 questions
154,630 answers
156,371 comments
4,246 users