JC> CC> Here's what I eventually came up with:
JC>
JC> CC> void Token::getVariable() {
JC> CC> }
JC> I can't say as I like it very well. How 'bout:
JC>
JC> char *get_token(ifstream &inf, char *token, unsigned max) {
JC> }
That's a pretty clean almost structured version.
JC> However, the real soul of OO design is to pass the buck whenever
JC> possible:
JC>
JC> class token_stream : public ifstream {
JC> };
JC> vector get_token(token_stream &inf, vector &token) {
JC> }
That's what I was looking for. C++'s exception handling is pretty
close to java's (actually vice versa).
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)
|