在x.h中加入:
struct s_Cell
{
char *name;
int value;
s_Cell()
{
name =new char[12];
}
~s_Cell()
{
delete []name;
}
} S_CELL;在x.cpp中加入
#include "x.h"
但是程序 报错:
Compiling...
MyType.cpp
e:\方文件\execise\testdraw\mytype.cpp(2) : fatal error C1010: unexpected end of file while looking for precompiled header directive
testDrawView.cpp
Generating Code...
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\x.sbr': No such file or directory
Error executing bscmake.exe.testDraw.exe - 2 error(s), 0 warning(s)
struct s_Cell
{
char *name;
int value;
s_Cell()
{
name =new char[12];
}
~s_Cell()
{
delete []name;
}
} S_CELL;在x.cpp中加入
#include "x.h"
但是程序 报错:
Compiling...
MyType.cpp
e:\方文件\execise\testdraw\mytype.cpp(2) : fatal error C1010: unexpected end of file while looking for precompiled header directive
testDrawView.cpp
Generating Code...
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\x.sbr': No such file or directory
Error executing bscmake.exe.testDraw.exe - 2 error(s), 0 warning(s)
解决方案 »
- 子对话框实时显示付对话框内容
- DataGrid,ADO Data和SQL2000一起使用的问题
- send后由于中间网络断掉导致数据传输失败,如何检测到并重发?
- 大虾请出手(一定结贴),构造函数编译出错:error C2533: 'CWinApp::CWinApp' : constructors not allowed a return type
- 那位大大有QQ原代码发一份给我,拜谢!![email protected]
- 求教 如何在C++中实现用字符串做KEY的hashtable?{跪求解决方法}
- 使用ADO怎样获取和修改ACCESS数据库的密码?
- 大家认为最好用的VC的插件是什么?
- 初学者,简单问题。
- 有用Xtreme ToolkitPro v11.2.1的吗?我遇到一个奇怪问题,来看看
- CListCtrl控件的问题,请高手指教!!
- 模糊查询的问题!
在cpp文件中加入预处理头:
#include "stdafx.h"
CArray<s_Cell,s_Cell&> a;
s_Cell x;
x.name ="ad";
x.value =12;
a.Add (x);
CString s;
s.Format ("size is %d",a.GetSize ());
pDC->TextOut (12,12,s);
报错说好象是与指针相关的内容