Dear all:
I meet a problem when I use RWCString
I write an function as follow:
int process_priority(const RWCString & priorityline)
{
RWCString priority(priorityline[15]);
int i=atoi(priority);
return i;
}
I call this function in a loop, when calling it the first time,it;s ok. but the second time calling it, it cores dump. I use dbx to trace it, the error messages are as follow:
t@1 (l@1) signal BUS (invalid address alignment) in t_splay at 0xfd8c79c0
0xfd8c79c0: t_splay+0x0014: ld [%o2 + 16], %o4
Current function is RWCString::RWCString
233 RWCString(char c) {initChar(c);}
I'm not sure why the constructor of RWCString failed. who know it? and how to solve this problem?Thank you very much!!