我收到此错误:
error C3767: 'phys1::point::get_prev': candidate function(s) not accessible
这是我的代码
物理层
using namespace System;
namespace phys1 {
typedef struct position{
int x;
int y;
} pos;
public ref class point{
public:
point(float speed, float gr);
public:
pos get_prev();
public:
pos get_next();
};
}
物理cpp
// This is the main DLL file.
#include "phys.h"
using namespace System;
namespace phys1 {
...
static pos point::get_prev(){
pos point;
point.x=x;
point.y=y;
return point;
}
...
}
我尝试在库中使用的结构是否有问题?我可以用另一种方式构建它吗?