【发布时间】:2015-07-19 05:35:46
【问题描述】:
我正在使用 Visual Studio 2013,使用 C++ 编程,并且有一个具有以下属性的基类:
ref class AI
{
...
protected:
/// <summary>
/// Exit found flag. False if exit is yet to be found, true if it already was.
/// </summary>
bool exitFound;
...
}
在派生类中我有以下代码:
void AI_II::analyze(void)
{
...
this->exitFound = true;
if (this->exitFound)
{
if (this->distFront->lastTile == EXIT){...}
else if (this->distDown->lastTile == EXIT){...}
else if (this->distBack->lastTile == EXIT){...}
else if (this->distUp->lastTile == EXIT){...}
}
...
}
而且我不知道怎么做,但是在运行或调试时,总是会跳过if (this->exitFound) 语句。调试时,我收到“断点当前不会被命中...”消息。
我已经尝试清理解决方案,但到目前为止没有成功。谁能帮我找出问题所在?
【问题讨论】:
-
您确定您不是在调试发布(优化)版本吗? stackoverflow.com/questions/23348983/…
标签: c++ visual-c++ visual-studio-2013