包含"for"的功能没有展开的内联-这是什么意思,我该如何纠正 [英] The function containing "for " not expanded inline - what does this means and how may i correct it
本文介绍了包含"for"的功能没有展开的内联-这是什么意思,我该如何纠正的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
if (row_count > 0 && column_count > 0)
{
rows = row_count;
cols = column_count;
p = new double*[rows];
for (int r = 0; r < rows; r++)
{
p[r] = new double[cols];
// initially fill in zeros for all values in the matrix;
.****** for (int c = 0; c < cols; c++)(THE FUNCTION CONTAINING "FOR" NOT EXPANDED INLINE***********************
{
p[r][c] = 0;
}
}
删除了SHOUTING-OriginalGriff [/edit]
[edit]SHOUTING removed - OriginalGriff[/edit]
推荐答案
Borland认为在类主体中创建的构造函数是隐式inline
-,但不会与inline
代码中的for
循环有任何关系,因此会抱怨.
将代码移到一个单独的函数中,然后从构造函数中调用它.错误将消失.
您可能已经通过一个简单的Google自己找到了-如果搜索错误消息,通常会发现其他人以前遇到过,并发布了解决方案.如果您自己进行此类基础研究,可以节省大量时间!
Borland considers constructors created in the body of the class as implicitlyinline
- but it won''t have anything to do withfor
loops ininline
code, so it complains.
Move the code into a separate function, and call that from the constructor instead. The error will go away.
You could have found this out yourself with a simple google - if you search on an error message you normally find loads of other people have met it before, and posted solutions. It can save you a lot of time an d effort if you do such basic research yourself!
这篇关于包含"for"的功能没有展开的内联-这是什么意思,我该如何纠正的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文