关于VC6IDE的class view的问题(Go To Definition不能找到定义(实现))

一直在用vc6做项目可是发现vc6的class view总是有问题

查了一下资料,老外说是class view的一个bug

-----------------------症状--------------------------------

我已经定义了该函数,并且已经实现了,编译也能通过

可是当我使用Go To Definition的功能的时候,死活就是说我没实现

查过资料后知道,原来这是由于typedef xbr XBR

我用XBR定义了一个参数,于是,就出现了上述问题了

----------下面是老外的解答,小抄一下-------------------

VS has some problems with typdef'd stuff when using "Go To Definition." i find that it at times can't even handle very basic typedefs that are equivalent to #defines. but then the next time i go back to the same project it will all be fine.
--------------------------------------------------

另外

------------继续小抄-------------------------------------

This may happen, for example, when function definitions in h and cpp files are slightly different, for example:

void MuFunction(LPCTSTR);
void CMyClass::MyFunction(LPCTSTR s){}



Class Wizard is not so smart as compiler. Sometimes enumeration parameter cause the problem:

enum MyEnum
{
FIRST,
SECOND
};
void MyFunction(MyEnum n);
void CMyClass::MyFunction(MyEnum n){}



In this case such definition can help:

void MyFunction(enum MyEnum n);
void CMyClass::MyFunction(enum MyEnum n){}



However, I still have the cases when Class Wizard cannot find function implementation. It would be interesting to see other replies to your answer.
--------------------------------------------------------------------------
还有这样的情况
-------------------------小抄--------------------------------------------
I remember that sometimes VC6 IDE had problems locating
definitions when function's parameters were on different
lines:

// .H file
class X
{
void foo(int a, int b, int c);
};

// .CPP file
void X::foo(
int a,
int b,
int c)
{
...
}

Or something along this example. I never figured out exact
case when it stopped working. If you have an opportunity to
get Visual Assist for VC6, then do it. It will save a _lot_
of hair on your head.
-----------------------------------------------------------------------------------------
这些都能引起不能找到定义
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值