谁知道VC++识别不了CString是怎么回事呀
D:\System7\CheckDlg.cpp(62) : error C2440: '=' : cannot convert from 'char [41]' to 'int'
D:\System7\CheckDlg.cpp(57) : error C2065: 'str' : undeclared identifier
不认识我定义的字符串了
D:\System7\CheckDlg.cpp(62) : error C2440: '=' : cannot convert from 'char [41]' to 'int'
D:\System7\CheckDlg.cpp(57) : error C2065: 'str' : undeclared identifier
不认识我定义的字符串了
估计可能是用法的问题。
和楼上的一样,代码呢?
。BOOL CCheckDlg::OnInitDialog()
{
CDialog::OnInitDialog();
Cstring SQL,str;
// TODO: Add extra initialization here
//必须有别处查好的指针传过来
m_ppbiSet=&(pDoc->m_patientBInfoSet);
str=m_CsID=m_pchSet->m_ID;
SQL="select * from PatientBInfoSet where ID='"+str+"'";
m_ppbiSet->Open(AFX_DB_USE_DEFAULT_TYPE,SQL);
m_CsName=m_pchSet->m_Name;
m_CsSex=m_ppbiSet->m_Sex;
m_nAge=m_ppbiSet->m_Age; m_List_CaseHistory.InsertColumn(0,"时间",LVCFMT_LEFT, 40);
m_List_CaseHistory.InsertColumn(1,"科室",LVCFMT_LEFT,40);
m_List_CaseHistory.InsertColumn(2,"诊断结果",LVCFMT_LEFT,40);
m_List_CaseHistory.InsertColumn(3,"处方",LVCFMT_LEFT,40);
int i=1;
while(!m_pchSet->IsEOF()){
int j=1;
m_List_CaseHistory.InsertItem(0,"i");
m_List_CaseHistory.SetItemText(i,j,m_pchSet->m_Date);
j++;
m_List_CaseHistory.SetItemText(i,j,m_pchSet->m_Depart);
j++;
m_List_CaseHistory.SetItemText(i,j,m_pchSet->m_Result);
j++;
m_List_CaseHistory.SetItemText(i,j,m_pchSet->m_PreDescription); m_pchSet->MoveNext();//你所需要的数据都可以通过这个指针找到
i++;
}
m_pchSet->Close();
m_ppbiSet->Close(); return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
我估计问题不是出在这,是在MFC里编的
D:\System7\CheckDlg.cpp(57) : error C2065: 'str' : undeclared identifier
双击来到出错的地方呀
这代码全贴出来了 也不容易看 贴关键的