<ACPS2924@Ryerson.Ca> (05/19/91)
My class contains an Array,data;
All I want to do is pass an Array type and copy it to my
my private Array,data;
Obviously this the following code does not work!
It goes it to an infinite loop inside the int() method of the
ArrayIterator class in the copy process.
What am I doing wrong. All I want to do is make a duplicate of the passed
Array.
CODE FOLLOWS......
#include <object.h>
#include <array.h>
#include <clsdefs.h>
#include <strng.h>
#include <assoc.h>
String* s1 = new String("one");
String* s2 = new String("two");
Association* a1 = new Association(*s1,*s2);
class db: public Object
{
public:
db(Array a);
...
private:
Array data;
}
db::db(Array a):data(a)
{
}
main()
{
Array t(2);
...
t.add(*s1);
t.add(*s2);
t.add(*a1);
...
db test(t);
// Never gets to here .....
}
+----------------------------------------------------------------------+
acps2924@ryerson.ca ! Who is the ! If plumbers designed toilets like
! user,pray, ! software professionals design tools,
! and who is ! we'd be up to our knees in crap.
! the used ? ! - Charles A. Rovira
+----------------------------------------------------------------------+