TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BLAKE GAFFNEY
from: TIM HUTZLER
date: 1998-04-14 08:59:00
subject: Re: overloaded[][]

TH>I want to overload the '[' to facillitate 2-dimentional arrays, ie.
TH>thisVal = table[x][y];
BG>It can be done. The idiom for this is to return multiple class
BG>objects, using  a private nested class.
[...]
Thanks for the code examples. What I was looking for was a single
class implementation, but I have only seen examples along the lines
that you have illustrated. Maybe that is the only way it can be done.
Again, thanks.
Now, if you don't mind me asking another question...
I have a few applications that scan directories and sub- directories.
As you probably know - the 'dirent' functions are particularly good
for this. However, in order to get at some file information such as
the files size and date, I have been building a full path string
(unless in the current directory,) and then opening the file to use
the various functions.
It yould be nice to have a library function that would return the
directories attributes like the DOS calls 'findfirst' and 'findnext.'
It seems that 'diropen' returns an FCB, it's about the right size for
one (37 butes), but the structure does not document the elements.
I just want to examine a files size and date without opening them and
closing them.
Any comments or suggestions?
___ Blue Wave/QWK v2.12
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.