access violation问题 - VC/MFC / 基础类
大家好阿,我有一个类 class CItem { public: char itemName[20][100]; CItem(); }; CItem::CItem() { memset(itemName,0x00,sizeof(itemName)); } CItem* items[20]={NULL}; items[0]=new CItem(); 有一个Cstring对象itemInLine,然后我尝试向items[0]所指向到那个对象的itemName里拷贝字符串 CItem* ptrToItem; ptrToItem=items[0]; strcpy((ptrToItem->itemName[index]),itemInLine.GetBuffer(0)); strcpy那句提示access violation了,求高人指点,谢谢
itemInLine.GetBuffer(0))-->itemInLine.GetBuffer(itemInLine.GetLength()+1) index是多少啊?引用 index是多少啊? 抱歉,忘记写了,index是0 index 可能使数组越界了, index的值是多少?.引用 index 可能使数组越界了, index的值是多少?. index是0~~~ 额。。。那就麻烦大家的眼睛了 class CItem { public: char* type; int left; int top; char* style; int lineIndex; int columnIndex; int totalItem; int len[20]; int count[20]; char itemName[20][100]; char item[20][100]; char toPrint[50][46]; CItem(); }; CItem::CItem() { type=NULL; left=8; top=0; style=NULL; lineIndex=0; columnIndex=0; totalItem=0; memset(toPrint,0x20
相关问答:
使用ACCESS最大的隐患就是不安全。今天对ACCESS数据库设置了一个密码,必须使用密码才能打开,但是在程序中却无法连接数据库了。大家知道使用用户名和密码,如何连接ACCESS数据库?貌似ACCESS的用户名还不知道?只知 ......
我这里有一个score.mdb的access数据库。里面有课程、姓名、学号、成绩四项。我想通过VC连接access数据库,并在VC中得到0-59、60-69、70-79、80-89、90-100这几个分数段的人数和总人数。谁能帮忙。本人菜鸟。希望详细 ......
create view 表名 as select a.a1,b.b1 from a inner join b on a.id=b.id 这个语法怎么写上去是错的在Access里 ACCESS好像不支持create view 你可以在ACCESS中单击“视图”菜单,选择“SQL视图”命令, ......
提示错误 :请尝试执行下列操作: 单击刷新按钮,或稍后重试。 打开 localhost 主页,然后查找与所需信息相关的链接。 HTTP 错误 500.100 - 内部服务器错误 - ASP 错误 Internet 信息服务 ------------- ......