I'm fairly new to objective C and I'm just learning how to use functions. In the below function I understand what the first line does but then the statements below have me a bit confused can anyone explain it to me? Its the "theBudget->budget" bit I dont understand.
This is standard C notation, and a fundamental construct of the language. If you don't understand it, then you really need to go back to basics and get yourself an introductory book. The first parameter (theBudget) in the function declaration is a pointer to a budget object (Class or Structure). In the first line of the function the program is subtracting the value of the dollars item from the budget member of the object. A rather poor use of names calling a member of the object by the same name as the object type. In fact I'm not sure that that would not produce a compiler error or warning.
Thanks for the explanation. I am a beginner and this is an example they are using in an introductory book to explain functions. Going off what you have said this is a pretty poor example which is probably why I'm getting a bit confused.Thanks for the help
I am starting out in Apple dev environments. I have downloaded some pdf's and located some tutorials on the Internet however do not know where to start. There are some on iOS programming, some Objective-C, some Soryboard etc...
Any pointers on how to proceed and sequence will be appreciated. My main interest initially is iPhone.
Just curious about that. Maybe with qualification it would be clearer. Like it isn't 'valid' because it is a homework question and one should do ones own work? If so then 'valid' might not be the best word.
Or perhaps because it isn't possible to do what the OP asked in Objective-C?