By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 1,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

Tru64: Using stringstream to convert inbt/long to string causes application to crash

P: n/a
Hi,

I have a c++ application compiled using

Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.5-014 (cxx) cxx Driver

The problem is that the application is having unaligned access error
and is core dumping whenever I use stringstream to convert integer or
long to string.

std::stringstream x;
int y = 1234;
x << y;

But if I use the following code, i.e. initialize the stringstream
object using the constructor, i do not face the coree dump:

std::stringstream x("");
int y = 1234;
x << y;

Can someone help me out in resolving theissue in the first code.

Thanks in advance.

- Avinash

Apr 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
av*******@gmail.com wrote:
Hi,

I have a c++ application compiled using

Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.5-014 (cxx) cxx Driver

The problem is that the application is having unaligned access error
and is core dumping whenever I use stringstream to convert integer or
long to string.

std::stringstream x;
int y = 1234;
x << y;

But if I use the following code, i.e. initialize the stringstream
object using the constructor, i do not face the coree dump:

std::stringstream x("");
int y = 1234;
x << y;

Can someone help me out in resolving theissue in the first code.

Thanks in advance.

- Avinash


This sounds like a bug in your standard library implementation. Who is
your standard library vendor? Have you tried another implementation
(e.g., STL-port, Dinkumware, etc.)? What happens when you use
std::ostringstream with no initializer in the same way?

Cheers! --M

Apr 11 '06 #2

P: n/a
>
This sounds like a bug in your standard library implementation. Who is
your standard library vendor?
How do I check that
Have you tried another implementation
(e.g., STL-port, Dinkumware, etc.)? What happens when you use
std::ostringstream with no initializer in the same way?

It still fails
Cheers! --M


Apr 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.