[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ Question
From: |
John W. Eaton |
Subject: |
C++ Question |
Date: |
Wed, 18 Jun 2003 08:31:03 -0500 |
On 17-Jun-2003, Matthew Wollenweber <address@hidden> wrote:
| The following code is segfaulting and I have no idea why. I found the line
| that is crashing, and ddd wasn't much help.
|
| I'm coding in C++, RefImage -> Cols is an integer. In the first iteration
| it's 32 in the second it's 64. I am SURE and have verified that RefImage
| -> Cols is not NULL. Yet the folling code crashes on the second iteration.
| Does anyone know why?
Probably not, because it doesn't appear that you have provided enough
context to allow the bug to be reproduced. If you could provide a
complete example that demonstrates your problem, someone might be able
to help you.
| RowVector X;
|
| for(int level = levels +1; level >= 1; level --)
| {
| ......
| //segfaults on the next line on the 2nd iteration
| X = RowVector(RefImage -> Cols, 0);
|
| ....
|
| }
What you show looks fine, provided that RefImage->Cols is a int. My
guess is that the real problem is in some other part of your code but
it just happens to show up here.
jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- C++ Question, Matthew Wollenweber, 2003/06/17
- C++ Question,
John W. Eaton <=