TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: MARK HOOVER
from: DARIN MCBRIDE
date: 1998-04-08 07:58:00
subject: reading input from stdin

RS> An array is base 0, meaning that the first subscript is 0.
 MH> Just out of curiosity.....is there anyway to set the array base to base 
 MH> 1?  I have no intention of doing this, but I know it can sometimes be 
 MH> done in other languages such as Basic....
Create a class, overload the [] operator, and just subtract one.  :-)
Note that "other languages" cannot change either - in BASIC, it is ALWAYS 
1-based, you can't "sometimes" have it one-based...
---
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

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™.