| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 634 人关注过本帖
标题:请教一个问题 程序出错了!-->woodhead转移
只看楼主 加入收藏
lishiwen
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2005-11-28
收藏
 问题点数:0 回复次数:0 
请教一个问题 程序出错了!-->woodhead转移
我用vc6.0:
首选建了一个win32 application的空工程
然后写了一个text1.cpp的文件:
#include <afxwin.h>
   // Declare the application class
   class CHelloApp : public CWinApp
   {
   public:
   virtual BOOL InitInstance();
   };
   // Create an instance of the application class
   CHelloApp HelloApp;
   // Declare the main window class
   class CHelloWindow : public CFrameWnd
   {
   CStatic * cs;
   public:
   CHelloWindow();
   };
   // The InitInstance function is called each
   // time the application first executes.
   BOOL CHelloApp::InitInstance()
   {
   m_pMainWnd = new CHelloWindow();
   m_pMainWnd->ShowWindow(m_nCmdShow);
   m_pMainWnd->UpdateWindow();
   return TRUE;
   }
   // The constructor for the window class
   CHelloWindow::CHelloWindow()
   {
   // Create the window itself
   Create(NULL,
   "Hello World!",
   WS_OVERLAPPEDWINDOW,
   CRect(0,0,200,200));
   // Create a static label
   cs = new CStatic();
   cs->Create("hello world",
   WS_CHILD|WS_VISIBLE|SS_CENTER,
   CRect(50,80,150,150),
   this);
   }
然后在工程中seting中使用mfc共享dll然后运行出错:
--------------------Configuration: lili - Win32 Debug--------------------
Compiling...
Text1.cpp
d:\lishiwen\lili\text1.cpp(2) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(2) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(2) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(2) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(2) : error C2014: preprocessor command must start as first nonwhite space
d:\lishiwen\lili\text1.cpp(3) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(3) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(3) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(3) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(4) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(4) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(4) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(4) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(5) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(5) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(5) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(5) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(5) : error C2504: 'CWinApp' : base class undefined
d:\lishiwen\lili\text1.cpp(6) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(6) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(6) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(6) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(7) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(7) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(7) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(7) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(7) : error C2146: syntax error : missing ';' before identifier 'InitInstance'
d:\lishiwen\lili\text1.cpp(7) : error C2433: 'BOOL' : 'virtual' not permitted on data declarations
d:\lishiwen\lili\text1.cpp(7) : error C2501: 'BOOL' : missing storage-class or type specifiers
d:\lishiwen\lili\text1.cpp(8) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(8) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(8) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(8) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(9) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(9) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(9) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(9) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(10) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(10) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(10) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(10) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(11) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(11) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(11) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(11) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(12) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(12) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(12) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(12) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(13) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(13) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(13) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(13) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(13) : error C2504: 'CFrameWnd' : base class undefined
d:\lishiwen\lili\text1.cpp(14) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(14) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(14) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(14) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(14) : error C2143: syntax error : missing ';' before '*'
d:\lishiwen\lili\text1.cpp(14) : error C2501: 'CStatic' : missing storage-class or type specifiers
d:\lishiwen\lili\text1.cpp(14) : error C2501: 'cs' : missing storage-class or type specifiers
d:\lishiwen\lili\text1.cpp(15) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(15) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(15) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(15) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(16) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(16) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(16) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(16) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(17) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(17) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(17) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(17) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(18) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(18) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(18) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(18) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(19) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(19) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(19) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(19) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(20) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(20) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(20) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(20) : error C2018: unknown character '0xa1'
d:\lishiwen\lili\text1.cpp(20) : error C2143: syntax error : missing ';' before 'tag::id'
d:\lishiwen\lili\text1.cpp(20) : error C2501: 'BOOL' : missing storage-class or type specifiers
d:\lishiwen\lili\text1.cpp(20) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.

lili.exe - 1 error(s), 0 warning(s)


搜索更多相关主题的帖子: woodhead 
2006-04-01 15:52
快速回复:请教一个问题 程序出错了!-->woodhead转移
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.049576 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved