[Top][All Lists]

[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.


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]