Hey i'm trying to multithread my program in c++/cli but i'm having problems with creating the threads the code im using is:
Code:
private: Void startThread(){
MoveProj.Velocity = Variables.Velocity;
MoveProj.ProjectilePos = Projectile1.ProjectilePos;
Thread^ MotionThread1 = gcnew Thread(gcnew ParameterizedThreadStart(MoveProj ,MotionThread::MoveProjectile));
Thread^ MainThread = gcnew Thread(gcnew ThreadStart());
}
but i'm getting the errors
Code:
Error 44 error C3350: 'System::Threading::ParameterizedThreadStart' : a delegate constructor expects 2 argument(s) c:\users\gaz\documents\visual studio 2012\projects\projectilemotion\projectilemotion\Simulation.h 344
Error 89 error C3350: 'System::Threading::ParameterizedThreadStart' : a delegate constructor expects 2 argument(s) c:\users\gaz\documents\visual studio 2012\projects\projectilemotion\projectilemotion\Simulation.h 344
Error 45 error C3350: 'System::Threading::ThreadStart' : a delegate constructor expects 2 argument(s) c:\users\gaz\documents\visual studio 2012\projects\projectilemotion\projectilemotion\Simulation.h 345
Error 90 error C3350: 'System::Threading::ThreadStart' : a delegate constructor expects 2 argument(s) c:\users\gaz\documents\visual studio 2012\projects\projectilemotion\projectilemotion\Simulation.h 345
Error 43 error C3867: 'MotionThread::MoveProjectile': function call missing argument list; use '&MotionThread::MoveProjectile' to create a pointer to member c:\users\gaz\documents\visual studio 2012\projects\projectilemotion\projectilemotion\Simulation.h 344
Error 88 error C3867: 'MotionThread::MoveProjectile': function call missing argument list; use '&MotionThread::MoveProjectile' to create a pointer to member c:\users\gaz\documents\visual studio 2012\projects\projectilemotion\projectilemotion\Simulation.h 344
any help with this would be a great help as its for my college computing project and my tutor wants it in relatively soon.