저는 MS Visual Studio 2010 Professional을 사용하여 요즘 C++/CLI (Visual C++) 프로젝트를 작업하고 있습니다. 어떤 클래스를 사용하는 SRecognizer
클래스가 있습니다. 자, 다음 코드'System :: Threading :: ThreadStart': error
r = gcnew RTMotionDetector();
Thread ^detectionThread = gcnew Thread(gcnew System::Threading::ThreadStart(this,&r->start()));
RMotionDetector
클래스의 헤더는 프로그램이 실행되는
#pragma once
#include "MotionDetector.h"
ref class RTMotionDetector :
public MotionDetector
{
public:
RTMotionDetector(void);
~RTMotionDetector(void);
void start();
void pause();
void stop();
private:
VideoCapture *cam1;
};
아래, 그것은 다음과 같은 오류
1>------ Build started: Project: Automated Intruder Tracking System, Configuration: Debug Win32 ------
1>Build started 7/3/2013 1:03:49 PM.
1>InitializeBuildStatus:
1> Touching "Debug\Automated Intruder Tracking System.unsuccessfulbuild".
1>GenerateTargetFrameworkMonikerAttribute:
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>ClCompile:
1> All outputs are up-to-date.
1> SRecognizer.cpp
1>SRecognizer.cpp(38): error C2102: '&' requires l-value
1>SRecognizer.cpp(38): error C3350: 'System::Threading::ThreadStart' : a delegate constructor expects 2 argument(s)
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.19
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
당신이 볼 수 있듯이을 제공하고, 오류는 위의 특정 코드가 이미있는 SRecognizer
에 스레드를 어떻게 작성했는지와 관련이 있습니다. 나는 C++/CLI에 상당히 익숙하다. 제발 도와주세요.
당신은 누락 ")"오류를 수정 했습니까? 이것은 분명합니다. 더 많은 것을 바꿀 수 있습니까? – JeffRSon
@JeffRSon : 답장을 보내 주셔서 감사합니다. 나는 그 문제를 바로 잡았다. 이제 누락 된 l- 값 및 기타 오류가 남아 있습니다 –