Thread View: comp.sys.mac.oop.macapp3
1 messages
1 total messages
Started by Euro Tech Svcs, OOP Spec
Thu, 19 Nov 1992 03:54
Re: CStr31 Array Syntax???
Author: Euro Tech Svcs, OOP Spec
Date: Thu, 19 Nov 1992 03:54
Date: Thu, 19 Nov 1992 03:54
31 lines
1401 bytes
1401 bytes
Ken,
CStr31 fPeriodNames[3];
is equivalent to
CStr31 fPeriodNames[3] = {CStr31::CStr31(), CStr31::CStr31(),
CStr31::CStr31()};
In ARM (C++ Annotated Reference Manual) page 264, it is stated that:
"... it allowed an array of objects to be initialized by a standard function
taking a pointer to function argument specifying what initialization needed to
be done for each element in the array".
So, CFront initializes by taking the adress of CStr31::CStr31() and iterating
from 0 to 2.
Now, CStr31::CStr31() is declared inline (in PascalString.h), and if you take
the address of an inline function, an explicit (non-inline) copy has to be
created (ARM page 102).
This is what the compiler is warning you about. Nothing is wrong. Fix is to go
into PascalString.h and remove the inline specification. (I advise against
doing that, just ignore the warnings).
Regards,
Jeroen Schalk
Object Programming Specialist
European Technology Services
Apple Computer Europe
Currently in DTS
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads