Need help with pointers

Joined
Jan 10, 2009
Messages
1
Reaction score
0
Code:
//If all is good, set up the timer event and lets roll!
   if(BREAKTIME >= 1000)
   {
      [B]TimedEvent * te = TimedEvent::Allocate(&Announcer, new NoSharedPtrCallbackP0<Announcement>(&Announcer, &Announcement::Run), 1, BREAKTIME, 0);[/B]
      sWorld.event_AddEvent(te);
   } else {
      //Someone has their time set under 1 second.;P
      ShowMsg("Announcer has been disabled.  Please insure you have the config set right!");
   }

}

Code:
1>------ Build started: Project: Announcer, Configuration: Release Win32 ------
1>Compiling...
1>Announcer.cpp
1>..\src\Announcer\Announcer.cpp(46) : error C2664: 'TimedEvent::Allocate' : cannot convert parameter 1 from 'Announcement *' to 'std::tr1::shared_ptr<_Ty>'
1>        with
1>        [
1>            _Ty=EventableObject
1>        ]
1>        Constructor for class 'std::tr1::shared_ptr<_Ty>' is declared 'explicit'
1>        with
1>        [
1>            _Ty=EventableObject
1>        ]

Can anyone help me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top