Re: g++ compile warning: extra tokens at end of #include directive
From: Mike Hewson (hewsmike_at_optusnet.com.au)
Date: 01/07/05
- Next message: japh: "Re: g++ compile warning: extra tokens at end of #include directive"
- Previous message: japh: "g++ compile warning: extra tokens at end of #include directive"
- In reply to: japh: "g++ compile warning: extra tokens at end of #include directive"
- Next in thread: japh: "Re: g++ compile warning: extra tokens at end of #include directive"
- Reply: japh: "Re: g++ compile warning: extra tokens at end of #include directive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 07 Jan 2005 19:03:11 +1100
japh wrote:
> I just started learning c++ and am at the point of using:
>
> #include "myclass.cpp"
>
> instead of having the class definition in the main file. But I am
> getting this warning at compile time:
>
> cat.cpp:4:19: warning: extra tokens at end of #include directive
>
> The program compiles and runs fine, but the warning is puzzling and
> concerns me. A google search returned lots of matches but no
> solutions...
>
> Any ideas? thanks
You'd put the interface/declarations in say "myclass.h" and include
that. The definitions are in "myclass.cpp" and get added to your compile
( and link ) list for the project.
<aside>
ISO/IEC 14882:1998(E) © ISO/IEC
16.2 Source file inclusion
.
.
5 The mapping between the delimited sequence and the external source
file name is implementation defined. The implementation provides unique
mappings for sequences consisting of one or more nondigits (2.10)
followed by a period (.) and a single nondigit. The implementation may
ignore the distinctions of alphabetical case.
<end aside>
-- Cheers -- Hewson::Mike "This letter is longer than usual because I lack the time to make it shorter" - Blaise Pascal
- Next message: japh: "Re: g++ compile warning: extra tokens at end of #include directive"
- Previous message: japh: "g++ compile warning: extra tokens at end of #include directive"
- In reply to: japh: "g++ compile warning: extra tokens at end of #include directive"
- Next in thread: japh: "Re: g++ compile warning: extra tokens at end of #include directive"
- Reply: japh: "Re: g++ compile warning: extra tokens at end of #include directive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|