Re: warning: initialization makes integer from pointer without a cast
Re: warning: initialization makes integer from pointer without a cast
- Subject: Re: warning: initialization makes integer from pointer without a cast
- From: "Dave DeLong" <email@hidden>
- Date: Thu, 21 Aug 2008 07:40:49 -0700
Try putting an * after both uses of "char".
CStrings (char arrays) are char pointers.
Dave
On Thu, Aug 21, 2008 at 6:42 AM, Stuart Green <email@hidden> wrote:
> Hi,
>
> I'm either overlooking something extremely simple here or I'm losing my
> mind.
>
> I have two NSString objects in a NSDictionary object that I am passing to a
> class method in the form:
>
> (int)validateUsersFor:(NSString *)username withEmailAddress:(NSString
> *)email
>
> Within the function, I need to convert the NSStrings back to C Strings (for
> a C API) so I'm using:
>
> const char cUserName = [username UTF8String];
> const char cEmail = [email UTF8String];
>
> However, come the build, I get
>
> warning: initialization makes integer from pointer without a cast
>
> I thought I was doing everything right. Any ideas?
>
> Cheers,
>
> Stu
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden