Re: static member initilization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux