title: Print dictionary in objective c
body: <p>i can't print my array, and i don't understand what is my problem</p>
  
  <p>in class Bank i have </p>
  
  <pre><code>@property (nonatomic,strong) NSMutableDictionary *accounts;
  </code></pre>
  
  <p>and  VOID function for create account in bank:</p>
  
  <pre><code>-(void)createAccount{
      int x=random()%10;
      NSString *keys=[NSString stringWithFormat:@"%i",x];
      Account *new_account=[[Account alloc]initWithAccountNum:x];
      [self.accounts setObject:new_account forKey:keys];
  }
  </code></pre>
  
  <p>in class Account i have</p>
  
  <pre><code>@property int num;
  @property int plus;
  </code></pre>
  
  <p>and methods:</p>
  
  <pre><code>-(id)initWithAccountNum:(int)_num{
      self=[self init];
      if(self!=nil){
          self.num=_num;
          self.plus=0;
      }
      return self;
  }
  
  -(NSString*)printer{
      return [NSString stringWithFormat:@"Account num=%i plus=%i",self.num,self.plus];
   }
  </code></pre>
  
  <p>i try print data to Nslog i main file:</p>
  
  <pre><code>Bank *bank=[[Bank alloc]init];
  [bank createAccount];
  
  for (Account *acc in bank.accounts) {
      Account *printed_account=[bank.accounts objectForKey:acc];
      NSLog(@"%@",printed_account.printer);
  
  }
  </code></pre>