S
Simon Bond
In C# we can go:
<foo.cs>
// Create a serializable class
[Serializable]
public class Foo : ISerializable
{
public void GetObjectData(SerializationInfo info,
StreamingContext context)
{};
}
// In our application
void MakeFoo()
{
Foo f = new Foo();
}
But in C++, I'm attempting:
<Foo.h>
[Serializable]
public __gc class Foo : public ISerializable
{
public:
Foo(){};
void GetObjectData(SerializationInfo* info,
StreamingContext* context);
};
<Foo.cpp>
// In the application
void MakeFoo()
{
Foo* foo = new Foo; //error C2259: cannot instantiate abstract class
}
I've been trying to get this to work for a number of hours now with no
success - any hints?
Cheers
- Si.
<foo.cs>
// Create a serializable class
[Serializable]
public class Foo : ISerializable
{
public void GetObjectData(SerializationInfo info,
StreamingContext context)
{};
}
// In our application
void MakeFoo()
{
Foo f = new Foo();
}
But in C++, I'm attempting:
<Foo.h>
[Serializable]
public __gc class Foo : public ISerializable
{
public:
Foo(){};
void GetObjectData(SerializationInfo* info,
StreamingContext* context);
};
<Foo.cpp>
// In the application
void MakeFoo()
{
Foo* foo = new Foo; //error C2259: cannot instantiate abstract class
}
I've been trying to get this to work for a number of hours now with no
success - any hints?
Cheers
- Si.