vC++unexpected end of file found
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/18 00:20:14
vC++unexpected end of file found
void CCalculator2Dlg::OnOffButton()
{
CString initialCaption, newCaption;
GetDlgItemText(IDC_OFF_BUTTON, initialCaption);
if (initialCaption == "&Power Off")
{
newCaption = "&Power On"; // -- hide all the controls
// -- CButton objects
//CButton *pButton = (CButton*) GetDlgItem(IDC_ADD_BUTTON);
//pButton ->ShowWindow(FALSE);
GetDlgItem(IDC_ADD_BUTTON)->ShowWindow(FALSE);
CButton *pButton;
pButton = (CButton*) GetDlgItem(IDC_SUB_BUTTON);
pButton ->ShowWindow(FALSE);
pButton = (CButton*) GetDlgItem(IDC_MUL_BUTTON);
pButton ->ShowWindow(FALSE);
pButton = (CButton*) GetDlgItem(IDC_DIV_BUTTON);
pButton ->ShowWindow(FALSE);
pButton = (CButton*) GetDlgItem(IDC_TOGGLE_BUTTON);
pButton ->ShowWindow(FALSE);
// -- CEdit objects
CEdit *pEdit = (CEdit*) GetDlgItem(IDC_NUM1_EDIT);
pEdit ->ShowWindow(FALSE);
pEdit = (CEdit*) GetDlgItem(IDC_NUM2_EDIT);
pEdit ->ShowWindow(FALSE);
pEdit = (CEdit*) GetDlgItem(IDC_RESULT_EDIT);
pEdit ->ShowWindow(FALSE);
// -- CScrollBar objects
CScrollBar *pSB = (CScrollBar*) GetDlgItem(IDC_NUM1_SCROLLBAR);
pSB ->ShowWindow(FALSE);
pSB = (CScrollBar*) GetDlgItem(IDC_NUM2_SCROLLBAR);
pSB ->ShowWindow(FALSE);
}
else
{
newCaption = "&Power Off"; // -- show all the controls
// -- CButton objects
CButton *pButton = (CButton*) GetDlgItem(IDC_ADD_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_SUB_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_MUL_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_DIV_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_TOGGLE_BUTTON);
pButton ->ShowWindow(TRUE);
// -- CEdit objects
CEdit *pEdit = (CEdit*) GetDlgItem(IDC_NUM1_EDIT);
pEdit ->ShowWindow(TRUE);
pEdit = (CEdit*) GetDlgItem(IDC_NUM2_EDIT);
pEdit ->ShowWindow(TRUE);
pEdit = (CEdit*) GetDlgItem(IDC_RESULT_EDIT);
pEdit ->ShowWindow(TRUE);
// -- CScrollBar objects
CScrollBar *pSB = (CScrollBar*) GetDlgItem(IDC_NUM1_SCROLLBAR);
pSB ->ShowWindow(TRUE);
pSB = (CScrollBar*) GetDlgItem(IDC_NUM2_SCROLLBAR);
pSB ->ShowWindow(TRUE);
}
// -- update the caption of the power button
SetDlgItemText(IDC_OFF_BUTTON, newCaption);
// -- reset the diolog box to its initial state
OnInitDialog();
return;
}
在MICRO VS2005没问题,但到VC6.0就不行了,这个CODE是VC6.0的其实.
fatal error C1004: unexpected end of file found
Error executing cl.exe.
还有这个问题.好奇怪啊.程序在VS2005都没问题.而且这些CODE都是VC++的
void CCalculator2Dlg::OnOffButton()
{
CString initialCaption, newCaption;
GetDlgItemText(IDC_OFF_BUTTON, initialCaption);
if (initialCaption == "&Power Off")
{
newCaption = "&Power On"; // -- hide all the controls
// -- CButton objects
//CButton *pButton = (CButton*) GetDlgItem(IDC_ADD_BUTTON);
//pButton ->ShowWindow(FALSE);
GetDlgItem(IDC_ADD_BUTTON)->ShowWindow(FALSE);
CButton *pButton;
pButton = (CButton*) GetDlgItem(IDC_SUB_BUTTON);
pButton ->ShowWindow(FALSE);
pButton = (CButton*) GetDlgItem(IDC_MUL_BUTTON);
pButton ->ShowWindow(FALSE);
pButton = (CButton*) GetDlgItem(IDC_DIV_BUTTON);
pButton ->ShowWindow(FALSE);
pButton = (CButton*) GetDlgItem(IDC_TOGGLE_BUTTON);
pButton ->ShowWindow(FALSE);
// -- CEdit objects
CEdit *pEdit = (CEdit*) GetDlgItem(IDC_NUM1_EDIT);
pEdit ->ShowWindow(FALSE);
pEdit = (CEdit*) GetDlgItem(IDC_NUM2_EDIT);
pEdit ->ShowWindow(FALSE);
pEdit = (CEdit*) GetDlgItem(IDC_RESULT_EDIT);
pEdit ->ShowWindow(FALSE);
// -- CScrollBar objects
CScrollBar *pSB = (CScrollBar*) GetDlgItem(IDC_NUM1_SCROLLBAR);
pSB ->ShowWindow(FALSE);
pSB = (CScrollBar*) GetDlgItem(IDC_NUM2_SCROLLBAR);
pSB ->ShowWindow(FALSE);
}
else
{
newCaption = "&Power Off"; // -- show all the controls
// -- CButton objects
CButton *pButton = (CButton*) GetDlgItem(IDC_ADD_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_SUB_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_MUL_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_DIV_BUTTON);
pButton ->ShowWindow(TRUE);
pButton = (CButton*) GetDlgItem(IDC_TOGGLE_BUTTON);
pButton ->ShowWindow(TRUE);
// -- CEdit objects
CEdit *pEdit = (CEdit*) GetDlgItem(IDC_NUM1_EDIT);
pEdit ->ShowWindow(TRUE);
pEdit = (CEdit*) GetDlgItem(IDC_NUM2_EDIT);
pEdit ->ShowWindow(TRUE);
pEdit = (CEdit*) GetDlgItem(IDC_RESULT_EDIT);
pEdit ->ShowWindow(TRUE);
// -- CScrollBar objects
CScrollBar *pSB = (CScrollBar*) GetDlgItem(IDC_NUM1_SCROLLBAR);
pSB ->ShowWindow(TRUE);
pSB = (CScrollBar*) GetDlgItem(IDC_NUM2_SCROLLBAR);
pSB ->ShowWindow(TRUE);
}
// -- update the caption of the power button
SetDlgItemText(IDC_OFF_BUTTON, newCaption);
// -- reset the diolog box to its initial state
OnInitDialog();
return;
}
在MICRO VS2005没问题,但到VC6.0就不行了,这个CODE是VC6.0的其实.
fatal error C1004: unexpected end of file found
Error executing cl.exe.
还有这个问题.好奇怪啊.程序在VS2005都没问题.而且这些CODE都是VC++的
vc6.0和vs2005并不完全一样,你看看return或是}吧.
vC++unexpected end of file found
unexpected end of file found
写一个函数,使给定的一个3*3二维整型数组转置,即行列互换.错误是unexpected end of file foun
Fortran end of file during read
cannot read beyond end of file
old file not found.However,a file of the same name was found
英语翻译patch Error old File not found.However,a file of the sam
file not found
+File+not+found是什么意思
He found the bookshop ______ the end of t
Write a program to append one file”1.txt” at the end of anot
File:System.ini Not Found!