早教吧 育儿知识 作业答案 考试题库 百科 知识分享

toomanycharactersinconstant这个问题好麻烦!BOOLCDlg041Dlg::OnInitDialog(){\x05CDialog::OnInitDialog();\x05//Add"About..."menuitemtosystemmenu.\x05//IDMABOUTBOXmustbeinthesystemcommandrange.\x05ASSERT((IDMABOUTBOX&0xFFF0

题目详情
too many characters in constant 这个问题好麻烦!
BOOL CDlg041Dlg::OnInitDialog()
{
\x05CDialog::OnInitDialog();
\x05// Add "About..." menu item to system menu.
\x05// IDM_ABOUTBOX must be in the system command range.
\x05ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
\x05ASSERT(IDM_ABOUTBOX < 0xF000);
\x05CMenu* pSysMenu = GetSystemMenu(FALSE);
\x05if (pSysMenu = NULL)
\x05{
\x05\x05CString strAboutMenu;
\x05\x05strAboutMenu.LoadString(IDS_ABOUTBOX);
\x05\x05if strAboutMenu.IsEmpty())
\x05\x05{
\x05\x05\x05pSysMenu->AppendMenu(MF_SEPARATOR);
\x05\x05\x05pSysMenu->AppendMenu(MF_STRING,IDM_ABOUTBOX,strAboutMenu);
\x05\x05}
\x05}
\x05// Set the icon for this dialog.The framework does this automatically
\x05// when the application's main window is not a dialog
\x05SetIcon(m_hIcon,TRUE);\x05\x05\x05// Set big icon
\x05SetIcon(m_hIcon,FALSE);\x05\x05// Set small icon
\x05
\x05// TODO:Add extra initialization here
\x05GetDlgItem('IDC_LABEL')->SetWindowText("更新控件内容");
\x05return TRUE; // return TRUE unless you set the focus to a control
}
我该怎么改呢?
▼优质解答
答案和解析
比如计算机智能识别20位以内的正整数,你给了个21位内的,就不是简单的数据溢出问题,是根本存不下.你是不是定义了一个整形值,初始化的时候给了过大的