Structure issue... mixed types are not supported (error C4368)

I am getting the following error...

error C4368: cannot define 'test' as a member of managed 'ServoController::ServoState': mixed types are not supported

Here is my code.

1
2
3
4
5
6
7
8
9
10
11
12

typedef int servo;
typedef servo* servoList;

typedef int servoPosition;
typedef servoPosition* servoPositionList;

struct servoState {
	servoList indexList;
	servoPositionList positionList;
};


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

// ServoController.h

#pragma once

#include "ServoTypes.h"

using namespace System;

namespace ServoController {

	public ref class ServoState
	{
		servoState test;
	};
}



What is the issue and how can I achieve what I want to another way, please?

Thanks!
I think this might be down to the fact I created my dll project as CLI.

Changed it to win32 project (dll) and not getting the error.

Thanks
Topic archived. No new replies allowed.