关于OTL编译通过,运行报错的问题
关于OTL编译通过,运行报错的问题:
代码如下:
#include <stdio.h>
#include <string.h>
#include <iostream>
#define OTL_ORA9I
#include "otlv4.h"
using namespace std;
otl_connect db;
#define CONNECTSTRING "tbas/tydic@ora9i"
char char_code[10]={"0000"};
int main()
{
otl_connect::otl_initialize();
db.rlogon(CONNECTSTRING);
otl_stream select(10,"SELECT latn_name FROM latn where area_code=:char_code<11>",db);
select<<char_code;
char c_name[10];
while(!select.eof())
{
select>>c_name;
cout<<"latn_name="<<c_name<<endl;
}
select.set_flush(false);
select.set_commit(0);
db.logoff();
}
//编译通过,但是运行报了一个这样的错,IOT/Abort trap(coredump)。应当是内存上面的问题,但是我就不知道什么原因,还望高手指导一下,我刚接触OTL这个东东!