- To: Mohsen Pahlevanzadeh <mohsen@xxxxxxxxxxxxxxxxx>
- Subject: Re: static member initilization
- From: Ian Lance Taylor <iant@xxxxxxxxxx>
- Date: Wed, 11 Jul 2012 02:16:15 -0700
- Cc: gcc-help@xxxxxxxxxxx
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- In-reply-to: <1341997638.4364.2.camel@debian>
On Wed, Jul 11, 2012 at 2:07 AM, Mohsen Pahlevanzadeh
<mohsen@xxxxxxxxxxxxxxxxx> wrote:
>
> I wrote a Makefile and you compile it just make command.
Thanks. Next time just create a single file.
This example doesn't compile at all, for reasons that have nothing to
do with anything you were asking about before. E.g., in test.cpp, you
write "std:endl". That is not valid C++.
You've been asking about eventList. The declaration in
eventhandlerabstract.h is:
static std::vector<std::string> *eventList ;
The declaration in eventhandlerabstract.cpp is:
template < class Class, typename ReturnType,typename Parameter1 ,
typename Parameter2 , typename Parameter3 , typename Parameter4 >
std::vector<std::string> EventHandlerAbstract<test,int, int , int,
int , int>::eventList; //specialization
The first is a pointer, the second is not, so you get an error.
As I said earlier, this is not a GCC issue. This is a C++ issue.
This mailing list is for help with GCC, not for help with C++.
Thanks.
Ian
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]