Tru64: passing integer to a stringstream causes crash

A

avidamani

Hi,

I have a c++ application in which I am using stringstream to convert
integer/long to string.

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

Whenever I do that I get an unalignedd access error and my application
core dumps. The compiler version is :
Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.5-014 (cxx) cxx Driver

But when I initialise the stringstream using its constructor before
passing int to it, it works.

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

Can anyone help me in finding out what is causing this kind of
behaviour in my application.
Thanks in advance.

Regards,
Avinash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top