This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: in g++(invalid use of incomplete type)


On 11 July 2011 13:28, Eric Lin wrote:
> http://examples.oreilly.com/9780596007614/
> both book and last time I copied, that example code did not have
> #include <locale>

So what? The example might be wrong, and in this case it definitely is.

If the compiler complains about an undefined type, make sure you are
including the correct header for that type.  Do not assume the example
is correct.  Learn to find which header defines the type - if you want
to be a C++ programmer you NEED to do that, you cannot send an email
every time you get a compilation error.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]