Looking for error message clarity


#1

When creating my Portfolio.m implementation I was recieving the following exception when I didn’t have my “StockHolding.h” file included…

for(StockHolding *tempStock in stockListing){ //Line throwing exception
sum += [tempStock valueInDollars]

I understand why I was recieving an error (the compiler didn’t know what StockHolding was) , but I couldn’t tell you what this exception means: “Receiver type ‘StockHolding’ for instance message is a forward declaration”.

An explanation would be most helpful… thanks!
R


#2

I can not explain it, but I recognize it.
Did you happen to use #import stockHolding instead of @class stockHolding?


#3

It means that the compiler was able to find a declaration but not the implementation. Look at viewtopic.php?f=181&t=3265
I hope this helps…


#4

Perfect Thanks all!