按C++编程宝典编的第一个程序就出搓搓,请帮助
发表在C语言图书答疑 2014-04-12
是否精华
版块置顶:
CFont font;
font.CreatePointFont(300,"宋体");
GetDlgItem(IDC_STAIC)->SetWindowText("明日科技");
GetDlgItem(IDC_STAIC)->SetFont(&Font);
//CDialog::OnOK();



错误提示

Compiling...
HellDlg.cpp
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(176) : error C2018: unknown character '0xa3'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(176) : error C2018: unknown character '0xbb'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(177) : error C2146: syntax error : missing ';' before identifier 'GetDlgItem'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(177) : error C2065: 'IDC_STAIC' : undeclared identifier
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(177) : error C2227: left of '->SetWindowTextA' must point to class/struct/union
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(177) : error C2018: unknown character '0xa3'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(177) : error C2018: unknown character '0xbb'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(178) : error C2146: syntax error : missing ';' before identifier 'GetDlgItem'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(178) : error C2227: left of '->SetFont' must point to class/struct/union
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(178) : error C2065: 'Font' : undeclared identifier
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(178) : error C2018: unknown character '0xa3'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(178) : error C2018: unknown character '0xbb'
f:\1.c++学习\1.练习编程\hell\helldlg.cpp(180) : error C2143: syntax error : missing ';' before '}'
执行 cl.exe 时出错.

HellDlg.exe - 1 error(s), 0 warning(s)
分享到:
精彩评论 1
学分: LV1
TA的每日心情
开心
2020-06-16 09:16:38
2014-04-24
沙发
这是你自己手敲的代码吧,要注意标点的英文和汉语形式,编程时要用英文标点。
你的代码中:
font.CreatePointFont(300,"宋体");
GetDlgItem(IDC_STAIC)->SetWindowText("明日科技");
GetDlgItem(IDC_STAIC)->SetFont(&Font);
结尾的;用了中文形式,应用;英文标点形式。
首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照