jeko <a.*********@fastwebnet.it> wrote:
I'm using a class method which read and write on private variable of own
class.
During the first alghoritm cycle, method read and write correclty on
num_elts variable, but during the second cycle as soon as method wants
read (or write) the variable program is aborted and return "segmentation
fault". Why? num_elts is a long variable.
Sorry, but it looks as if you picked the wrong newsgroup. You're here
in comg.lang.c and not comp.lang.c++ - and C doesn't have classes,
methods or private variables. But when you post there you probably
post a bit more of real code. From what you write nobody will be
able to tell you what's exactly going wrong and you might get one
of the standard-joke-answers like that the problem is on line 42...
So show at least how the class looks like, how you define the
instance of the class you're using and what you do in your com-
putations. Best would be a small, working program that exhibits the
problem (as an additional benefit one often finds the error when
one tries to cobble together such an example program).
Regards, Jens
--
\ Jens Thoms Toerring ___
Je***********@physik.fu-berlin.de
\__________________________
http://www.toerring.de