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::stringstre am 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::stringstre am x("");
int y = 1234;
x << y;
Can someone help me out in resolving theissue in the first code.
Thanks in advance.
- Avinash 2 4841 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::stringstre am 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::stringstre am 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::ostringstr eam with no initializer in the same way?
Cheers! --M
> 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::ostringstr eam with no initializer in the same way?
It still fails
Cheers! --M This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: roni |
last post by:
hi.
i have application written in vb.net + managed c++ dll that call also to
unmanaged c++ function.
the application crash.
i open the dump file of the crash with WinDbg and that's is the call stack
(using the sos.dll) :
=====================================
|
by: bryan |
last post by:
I think I'm missing something fundamental here. I'm trying to set an
unsigned long value via a u_long pointer, however it coredumps
everytime I get to that instruction. Here is a sample program that
demonstrates the issue:
--- snip ---
#include <unistd.h>
int main() {
char buf;
|
by: tony |
last post by:
hi.
my NET application is using mixed c++ dll ( managed and unmanaged)
in that dll , im calling api's of unamanged dll.
my application crash with no exception or warning.
its hard to find when the crash happen ,and where.
|
by: bussiere maillist |
last post by:
i've got a very long string
and i wanted to convert it in binary
like
string = """Monty Python, or The Pythons, is the collective name of
the creators of Monty Python's Flying Circus, a British television
comedy sketch show that first aired on the BBC on October 5, 1969. A
total of 45 episodes were made over four series. However, the Python
phenomenon was much greater, spawning stage tours, a musical, four
films, numerous albums, and...
|
by: Aman JIANG |
last post by:
hi
I need to do this (convert double to string) fast, safe and
portable. Is there any way to do this ?
Except the ways following:
1. C++ I/O stream, stringstream (and boost::lexical_cast)
2. sprintf (and its brothers)
3. any nonstandard C/C++ functions
| |
by: dan w01 |
last post by:
Hi,
I'm reading in a string of about 420 characters, the string is in binary. How do I either:
- convert a string of this length into an integer variable without getting a runtime error 6 (overflow error) which so far I have got from using CInt and Val commands.
- or read the file into an integer variable so that I can perform operations on it.
I've been searching for a while for this and can't find it anywhere, any help would be much...
|
by: mthread |
last post by:
Hi,
I would like to know the method to convert integer to string.
Thanx in advance.
|
by: yogi_bear_79 |
last post by:
I have a double of unknown length that I need to split at the
decimal. I thought I would convert it either to a string or a char.
char seems to be the best since it easily lends itself to splitting.
I have a few issues with this theory. Hard codeing char M works
fine for my test double -0.5 But I would like it to be more
versitile. The format "%2.2f" works fine with my test data, but that
should also be versitile.
inline void...
|
by: Dan Lyles |
last post by:
After a message is entered by the user, I must either encode it or decode it. In order to do so, I am supposed to input two strings to represent my table, but am unsure how to convert them to an array to do so.
private static final String CODE1=
"HTNZUL5m3lDQchenpIuORws1jPgVtzKWbfBxXSArdayCJkvqGiF2YoM4E";
private static final String PLAIN =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ,.;:";
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |