VC.net初学者遇到的一个奇怪问题.死活看不出来有什么错误!!!!! 大家帮帮忙

htdi78 2006-09-17 01:42:30
死活看不出来有什么错误!!!!! 大家帮帮忙


正在编译...
Pointtest.cpp
f:\我的文档\visual studio projects\pointtest\Point.h(43) : error C3149: “Point” : 非法使用托管类型“Point”;是否忘记了“*”?
f:\我的文档\visual studio projects\pointtest\Point.h(43) : error C2533: “Point::__ctor” : 构造函数不能有返回类型
f:\我的文档\visual studio projects\pointtest\Point.h(43) : fatal error C1903: 无法从以前的错误中恢复;正在停止编译


#pragma once
#using <mscorlib.dll>

using namespace System;

public __gc class Point
{
public:
Point();
Point(int,int);

__property int get_X()
{
return x;
}

__property void set_X (int value)
{
x=value;
}

__property int get_Y()
{
return y;
}

__property void set_Y(int value)
{
y=value;
}

String *ToString();

private:
int x;
int y;

}

Point::Point()
{
}

Point::Point(int xValue,int yValue)
{
x=xValue;
y=yValue;
}

String *Point::ToString()
{
return String::Concat(S"[",x.ToString(),S","y.ToString(),S"]");
}
...全文
257 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
真相重于对错 2006-09-18
  • 打赏
  • 举报
回复
private:
int x;
int y;

}; //
htdi78 2006-09-17
  • 打赏
  • 举报
回复
ding ding ding

各位高手帮帮忙啊

7,540

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 VC.NET
社区管理员
  • VC.NET社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧