TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: CAMERON CLARK
date: 1997-07-18 20:02:00
subject: exceptions in c++

    I've a little experience with java style exceptions, but none with c++.
    I need to alter the ifstream to throw an exception once an end of
    file is reached.
    EG.
    MYifstream.get(char c) {
      ifstream::get(c);
      if (ifstream::gcount()==0) {
         "thow end of file exception"
      }
    }
    .. in use
    try {
    do { ifs.get(c); } while (c==' ');
    } catch {
      "end of file" exception
    } finally {
      ...
    }
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)

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