473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Failure while assigning values to a variable: Aborted

Hi!
string* pWordlist;
pWordlist = new string[elements];

for(int i=0; i < elements; i++)
***pWordlist[i] = "";

...

pWortliste[tmpelement][previous] = buf[i];
aborts ("Aborted") at

tmpelement = 13;
previous = 0;

where until that point everything went fine (last values for both
variables were 12). tmpelement is still fairly lower than elements is.

"strace ./a.out" says

write(1, "tmpelement: 13 previous"...,
38tmpelement: 13 vorgaenger: 0) = 38
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
getpid() = 32184
kill(32184, SIGABRT) = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++

What the hell is wrong with this?

best regards
Moritz Beller
--
web http://www.4momo.de
mail momo dot beller at t-online dot de
gpgkey http://gpg.notlong.com
Jul 22 '05 #1
2 2251
On Sun, 7 Nov 2004 17:35:36 +0100
Moritz Beller <mo*****************@t-online.de> wrote:
string* pWordlist;
pWordlist = new string[elements];

for(int i=0; i < elements; i++)
***pWordlist[i] = "";

...

pWortliste[tmpelement][previous] = buf[i];


FYI: Concatenating strings with pWordlist[tmpelement] += buf[i];

best regards
Moritz Beller
--
web http://www.4momo.de
mail momo dot beller at t-online dot de
gpgkey http://gpg.notlong.com
Jul 22 '05 #2

"Moritz Beller" <mo*****************@t-online.de> wrote in message
news:cm*************@news.t-online.com...
Hi!
string* pWordlist;
pWordlist = new string[elements];

for(int i=0; i < elements; i++)
pWordlist[i] = "";

....

pWortliste[tmpelement][previous] = buf[i];
aborts ("Aborted") at

tmpelement = 13;
previous = 0;

where until that point everything went fine (last values for both
variables were 12). tmpelement is still fairly lower than elements is.
What the hell is wrong with this?

Several things could be wrong with it. pWortliste[tmpelement] could be a
zero length string, it certainly started as a zero length string. buf could
be an invalid pointer, or buf could be an array but smaller than i.

All of these are possible.


Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. (Xercer 2.4 and Xalan 1.7) When i execute the code i get the next run time error: ...
0
by: vanGogh | last post by:
I have generated classes based on an Xml schema file (xsd) using the XSD.exe tool. My goal is to: - write an application that can parse XML documents - fill objects (based on the generated...
1
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2...
12
by: bollod | last post by:
Is there any benefit to declaring a variable: x = (1<<12); instead of: x = 4096; (besides the geek appeal of course ;-) )
14
by: Eric Bantock | last post by:
Very basic question I'm afraid. Once an array has been declared, is there a less tedious way of assigning values to its members than the following: myarray=8; myarray=3; myarray=4; myarray=0;...
8
by: Antony | last post by:
compiler£ºVisual Studio.Net 2003 (VC7.1) compile type£ºDebug problem: wanted more information about the "Run-Time Check Failure #n",thanks! Example1: #include "stdafx.h" void malice() {...
6
by: psbasha | last post by:
Hi, I am assigning the list/dict values to another list/dict variable as shown below. List : List1 = List2 = List1
8
by: =?Utf-8?B?VHJlY2l1cw==?= | last post by:
Hello, Newsgroupians: I have a large class with a lot of member variables. I also have a function in the class that I would like to change ALL Of the member variables. I am trying to assign...
37
by: miken32 | last post by:
In PHP, if a function returns an array it's fairly common to capture its return values like this: <?php list($foo, $bar, $baz) = some_function_that_return_an_array(); ?> In Javascript, would...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.