M
Mark Ingram
Hi, can anyone tell me why I'm getting the following error:
error C4980: '__property' : use of this keyword requires /clrldSyntax
command line option
&
error C3813: a property declaration can only appear within the
definition of a managed type
Here is my code:
#pragma once
#pragma unmanaged
class WaveformData
{
public:
__property __int64 get_TotalSamples() { return m_totalSamples; }
__property void set_TotalSamples(__int64 value) { m_totalSamples =
value; }
__property int* get_SampleStart() { return m_sampleStart; }
__property void set_SampleStart(int* value) { m_sampleStart = value; }
__property int* get_SampleEnd() { return m_sampleEnd; }
__property void set_SampleEnd(int* value) { m_sampleEnd = value; }
__property __int64 get_TimelineTime() { return m_timelineTime; }
__property void set_TimelineTime(__int64 value) { m_timelineTime =
value; }
__property int get_Pixels() { return m_pixels; }
__property void set_Pixels(int value) { m_pixels = value; }
private:
__int64 m_totalSamples;
int* m_sampleStart;
int* m_sampleEnd;
__int64 m_timelineTime;
int m_pixels;
};
#pragma managed
I could do this previously in .NET 1.1 (and any unmanaged projects)
Has the syntax changed for basic c++ classes?
Thanks,
error C4980: '__property' : use of this keyword requires /clrldSyntax
command line option
&
error C3813: a property declaration can only appear within the
definition of a managed type
Here is my code:
#pragma once
#pragma unmanaged
class WaveformData
{
public:
__property __int64 get_TotalSamples() { return m_totalSamples; }
__property void set_TotalSamples(__int64 value) { m_totalSamples =
value; }
__property int* get_SampleStart() { return m_sampleStart; }
__property void set_SampleStart(int* value) { m_sampleStart = value; }
__property int* get_SampleEnd() { return m_sampleEnd; }
__property void set_SampleEnd(int* value) { m_sampleEnd = value; }
__property __int64 get_TimelineTime() { return m_timelineTime; }
__property void set_TimelineTime(__int64 value) { m_timelineTime =
value; }
__property int get_Pixels() { return m_pixels; }
__property void set_Pixels(int value) { m_pixels = value; }
private:
__int64 m_totalSamples;
int* m_sampleStart;
int* m_sampleEnd;
__int64 m_timelineTime;
int m_pixels;
};
#pragma managed
I could do this previously in .NET 1.1 (and any unmanaged projects)
Has the syntax changed for basic c++ classes?
Thanks,