Griaule Biometrics

Home » Forums » FINGERPRINT SDK » C/C++ Specific » TTemplate class issues
1 reply [Last post]
glfrank
Offline
Joined: 2010-07-19
Rate this post:
0
No votes yet
TTemplate class issues

Hi i keep getting the following errors when trying to implement your code into my program, i am using visual studio 2008, i am using the new syntax, is there anyway you can help me alter the piece of code i have pasted below so that it will work in my program? i actually do not know what the problem is, i am working on windows 7 operating system 64bit. all libs are working fine. i have created the TTemplate class in its own file, but even when i incorporate it into the DBclass file like in the sample i still get the same error. do you know what the issue is and how i can solve it, thanks

Header file:

#pragma once

using namespace System::Data;

// the template class
ref class TTemplate {
public:
 // Template data.
 System::Byte _tpt[];
 // Template size
 int _size;

 TTemplate(void);
 ~TTemplate(void);
};

CPP file:

using namespace System::Data;
using namespace GrFingerXLib;

// the template class
TTemplate::TTemplate(void) {
 // Template data
 _tpt = __gc new System::Byte[GRConstants::GR_MAX_SIZE_TEMPLATE];
 // Template size
 _size = 0;
}

TTemplate::~TTemplate(void) {
}

Error 1 error C4368: cannot define '_tpt' as a member of managed 'TTemplate': mixed types are not supported 

Error 2 error C2440: '=' : cannot convert from 'System::Byte ^' to 'unsigned char []'

davi.st1
Offline
Joined: 2010-08-26
Rate this post:
0
No votes yet

Dear customer,

 

after a search in google I found something that may be useful for you:

http://bytes.com/topic/net/answers/671265-c-cli-mixing-managed-unmanaged

 

Kind Regards,

----------------------------------

Davi Stuart Zilli

Griaule Support Team