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
相关问答:
有一个数据库里只有2W条数据不到,却有500M那么大,怎么回事啊?是ACCESS的数据库。后来我把ACCESS导入到MSSQL中,也占用了500M左右的空间,如果压缩数据库呢?请高手指点 压缩数据库?能做到么... 期待高人指点 我 ......
错误提示: Error creating bean with name 'DAOProxy' defined in class path resource [appcontext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionMana ......
我连接access数据库,以前一直很好,最近却总是出错(数据库连接出错!!),代码如下: connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&" ......
提示错误 :请尝试执行下列操作: 单击刷新按钮,或稍后重试。 打开 localhost 主页,然后查找与所需信息相关的链接。 HTTP 错误 500.100 - 内部服务器错误 - ASP 错误 Internet 信息服务 ------------- ......
大家帮忙一下ADO连接上了数据库,但是我操作的时候就会错误,不知道为什么,比如我声明了 _RecordsetPt m_pRecordset;来操作m_pRecordset->adoEOF就会出错,不知道为什么,只要用到m_pRecordset这个指针就会 ......