注册 登录
编程论坛 C++教室

请教一个C++问题

ngati 发布于 2009-08-26 22:15, 398 次点击
void CEdit_BoxDlg::OnChangeEdit2()
{
CString METext;
char Count[6];
int nCharNum,nLineNum;
m_MultiEdit.GetWindowText(METext);
nCharNum=METext.GetLength();
nLineNum=m_MultiEdit.GetLineCount();
nCharNum(nLineNum-1);       //there something before "("
itoa(nCharNum,Count,10);
n_Char.SetWindowText(Count);
itoa(nLineNum,Count,10);
n_Line.SetWindowText(Count);
}


这是个和对话框有关
大致意思是有两个对话框
上面一个是单行输入
下面一个是多行,并能计算出行数和字符数
就象我在注释里记录的:
nCharNum(nLineNum-1);       //there something before "("
还有这段代码逻辑上没有问题吧
这个应该属于MFC的primer级别的吧   
我想这里应该有人练过这样的代码
请教一下
谢谢大家
1 回复
#2
bczgvip2009-08-27 13:17
nCharNum(nLineNum-1);
有什么意义?不是已经错误了吗?
1