[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: error: forward declaration of
From: Michael Howell <mhowell123 () gmail ! com>
Date: 2009-03-16 0:05:34
Message-ID: 200903151705.39580.mhowell123 () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Sunday 15 March 2009 16:56:15 kaushik saurabh wrote:
> invalid use of incomplete type
The example is wrong. Or, more specifically, the example is not #include'ing a
header that is needed.
= Stop here if you don't want the technical description =
If you want to use anything, you must declare it. This is in the header files
or in your actual code.
Headers are basically canned declarations. For example, a header might declare
something like this.
[code]
class SomeNeededClass; // SomeNeededClass is an incomplete type.
class SomeNeedingClass { // SomeNeedingClass is a complete type.
SomeNeedingClass(const SomeNeededClass& needed);
doSomething();
};
[/code]
Though SomeNeedingClass can declare that it uses SomeNeededClass, it cannot
actually use it, since no information on how it can be used is declared.
--
Michael Howellmhowell123@gmail.com
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic