| Author |
Fix an infity loop
|
Pan Niko
Ranch Hand
Joined: Mar 19, 2011
Posts: 86
|
|
Hello,
I need to create 20 objects of Class B, using while loop in class A. In class B i have a variable that should increment each time an object is created, how i should build class B's cunstractor so each time that variable increase and not become zero?
|
 |
Pavan Kumar Dittakavi
Ranch Hand
Joined: Feb 12, 2011
Posts: 95
|
|
Use a static variable!
|
 |
Pan Niko
Ranch Hand
Joined: Mar 19, 2011
Posts: 86
|
|
Thank you
|
 |
 |
|
|
subject: Fix an infity loop
|
|
|