[ZOOM] C++ pointers

Ashley Sanders zzaascs at irwell.mimas.ac.uk
Thu Nov 1 16:04:10 CET 2001


Mike,

> If we go the way we seem to be going with the resultSet constructor,
> then we will presumably do the same with the record constructor, which
> will replace the resultSet::getRecord() method.  Then your code could
> be written:
> 
> 	for (size_t sz = 0; sz < rs.size (); ++sz)
> 	  cout << record(rs, sz)->field ("title") << endl;
> 
> At least, I think it can.

No. For the polymorphic behaviour we've designed into
the record heirarchy you need a reference or a pointer.
Stroustup, 3rd ed, page 312. Personally I feel more
at ease with pointers, but that's probably because I
started off with C.

Ashley.

-- 
Ashley Sanders                                a.sanders at mcc.ac.uk
COPAC: A public bibliographic database from MIMAS, funded by JISC
             http://copac.ac.uk/ - copac at mimas.ac.uk



More information about the ZOOM mailing list