ADS7328 wrote:
[..]
I changed into :
double DF= 0.0 ;
ostringstream str ;
str << " " << ":R" << ":::" <<
"01/01/1900" << ":" << DF ;
and I deleted the
str.~ostingstream() ;
and it seems to work fine.
But I don't undertsand if the entry " str.~ostringstream() "
was the problem.
If you were doing
char storage[sizeof(SomeType)];
SomeType *myObject = new (storage) SomeType;
it is not guaranteed to work because the alignment requirements
for a 'char' array and 'SomeType' can be different. To perform
proper placement new, your storage has to be allocated in free
store itself or other measures have to be taken (implementation-
specific, usually) to ensure proper alignment.
Why were you calling the destructor of 'str' yourself, anyway?
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask