Mail Archives: djgpp/1997/08/21/11:08:30
you must say:
KeyWord = new char[strlen(keyword)+1]
because strlen returns length of string without terminating '\0'
character. Generally, strcpy(new char[strlen(x)], x) will cause memory
corruption (one byte after allocated char array).
If you say that first constructor passes OK and 2nd breaks, then it may
be the cause - during first ctor you damage internal heap management
flags used by operator new and it blows up on second call.
Pavel
P.S. Sorry about not quoting your mail, but either this stuuupiiid M$
mailer is totally broken, or I'm much more stupid and I can't use it.
grrrr....
- Raw text -