使用其他类型重新定义 [英] Redefinition with a different type

查看:190
本文介绍了使用其他类型重新定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到这段代码时出现问题:

I'm having trouble with this block of code:

        for (int i = 0; i < [tempInviteeArray count]; i++)
    {
        NSArray *tempContact = [tempInviteeArray objectAtIndex:i];
        NSDictionary *tempContactDictionary = [tempContact objectAtIndex:1];
        int tempContactDelay = [[tempContact objectAtIndex:2] intValue];

        FlokContact *tempContact = [[FlokContact alloc] initWithJSONData:tempContactDictionary andDelay:tempContactDelay];


    }

最后一行抛出错误:

 "Redefinition of 'tempContact' with a different type

initWithJSONData:接受NSDictionary
andDelay:int

initWithJSONData: accepts NSDictionary andDelay: int

我试图用不同的类型重写这段代码所有,
我只是不确定我在做什么

I've tried to rewrite this code, with different types and all, I'm just not sure what I'm doing

推荐答案

你已经在这里声明了一个变量范围名为 tempContact NSArray * tempContact ... )。更改其中一个的名称。

You already declared a variable in this scope named tempContact (NSArray *tempContact...). Change the name of one of them.

这篇关于使用其他类型重新定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆