Re: invalid operands to binary?
Re: invalid operands to binary?
- Subject: Re: invalid operands to binary?
- From: Shawn Erickson <email@hidden>
- Date: Fri, 14 May 2004 10:29:27 -0700
On May 14, 2004, at 9:50 AM, email@hidden wrote:
why does this:
unsigned long long *total;
unsigned long long totalFileSizeK = total/1024;
give me this:
invalid operands to binary /
is there something easy i'm missing here?
In the above total is defined as a pointer to a ulonglong (the *) and
when you do "total/1024" you are attempting to divide the value of the
pointer (not the ulonglong). Surprised it is giving you this
error/warning [1] but... try "(*total)/1024" which dereferences total
to get at the ulonglong. Of course total needs to point at an allocated
ulonglong which in the above it doesn't appear to be.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.