我定義了一個Person類,并把person類放入一個數組中,遍歷數組控制臺由亂碼,我已經重寫discriptiondescription 輸出亂碼-(NSString*)description;{ ? ?return [NSString stringWithFormat:@"電影名:%@ 導演:%@ 主演:%@? 時長:%d分 上映時間:%@",_moivesName,_director,_actorName,_time,_moivesTime];}我講一個類放在一個數組中,想輸出類的所有信息,我重寫了decription方法,但現實太出現編號:0 (? ? "\U7535\U5f71\U540d\Uff1a\U897f\U6e38\U8bb0\U4e09\U6253\U767d\U9aa8\U7cbe \U5bfc\U6f14\Uff1a\U5f90\U5b9d\U745e \U4e3b\U6f14\Uff1a\U90ed\U5bcc\U57ce? \U65f6\U957f\Uff1a120\U5206 \U4e0a\U6620\U65f6\U95f4\Uff1a19:30",? ? "\U7535\U5f71\U540d\Uff1a\U957f\U57ce \U5bfc\U6f14\Uff1a\U5f20\U827a\U8c0b \U4e3b\U6f14\Uff1a\U5f20\U6db5\U4e88? \U65f6\U957f\Uff1a130\U5206 \U4e0a\U6620\U65f6\U95f4\Uff1a20:00")編號:1 (? ? "\U7535\U5f71\U540d\Uff1a\U897f\U6e38\U8bb0\U4e09\U6253\U767d\U9aa8\U7cbe \U5bfc\U6f14\Uff1a\U5f90\U5b9d\U745e \U4e3b\U6f14\Uff1a\U90ed\U5bcc\U57ce? \U65f6\U957f\Uff1a120\U5206 \U4e0a\U6620\U65f6\U95f4\Uff1a19:30",? ? "\U7535\U5f71\U540d\Uff1a\U957f\U57ce \U5bfc\U6f14\Uff1a\U5f20\U827a\U8c0b \U4e3b\U6f14\Uff1a\U5f20\U6db5\U4e88? \U65f6\U957f\Uff1a130\U5206 \U4e0a\U6620\U65f6\U95f4\Uff1a20:00")Program ended with exit code: 0
- 3 回答
- 0 關注
- 1728 瀏覽
添加回答
舉報
0/150
提交
取消