Re: Newbie needs help with an exercise from the Book Programming in Objective-C 2.0
Re: Newbie needs help with an exercise from the Book Programming in Objective-C 2.0
- Subject: Re: Newbie needs help with an exercise from the Book Programming in Objective-C 2.0
- From: Alexander von Below <email@hidden>
- Date: Mon, 02 Mar 2009 19:01:15 +0100
This is not the right list for this kind of question, but in C (and
thus in Objective-C) you simply can not ommit the operator like you do
in writing:
Am 02.03.2009 um 18:56 schrieb James Carroll:
Wrong:
triangleNumber = n (n + 1) / 2;
Correct:
triangleNumber = n * (n + 1) / 2;
If you write it like you did, the compiler thinks you want to call a
function called n. It does not know about that function, thus the
error is correct.
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden