大神的小菜------------------------------->菜鸟的大难
void __fastcall TArea::CommitClick(TObject *Sender)
{
String sex = "\n性别;";
sex += ((TRadioButton *)Sex->Controls[Sex->ItemIndex])->Caption;
String from = "\n来源:";
from += ((TRadioButton *)From->Controls[From->ItemIndex])->Caption;
String major = "\n专业:";
major += ((TRadioButton *)Major->Controls[Major->ItemIndex])->Caption;
String metier = "\n职业:";
int c = Metier->ControlCount;
for(int i=0;i<c;i++){
if(((TCheckBox *)Metier->Controls[i])->Checked)
metier +=((TCheckBox *)Metier->Controls[i])->Caption + "";
}
String area = "\n地区:"
c = Area->ControlCount;//提示这里出现系统错误
for(int i=0;i<c;i++){
if((TCheckBox *)Area->Controls[i])->Checked);
area + = ((TCheckBox *)Area->Controls[i]->Caption + "");
}
String answer = "调查结果:\n" + sex + from + major + metier + area;
ShowMessage(answer);
}
本次做的只是C++ builder一个选择功能模块 C++?builder控件应用
[解决办法]
String area = "\n地区:"
c = Area->ControlCount;//提示这里出现系统错误
for(int i=0;i<c;i++){
大小写敏感吗?
[解决办法]
大小写是敏感的,最好不要用大小写来区分不同的变量
[解决办法]
系统错误???没听说过!!!
[解决办法]
String area = "\n地区:"
c = Area->ControlCount;//提示这里出现系统错误
你这个Area是个啥东西?
[解决办法]
这个问题也太低级了,大小写的问题