Breymann. C++ Einführung und professionelle Programmierung
Breymann. C++ Einführung und professionelle Programmierung Breymann. C++ Einführung und professionelle Programmierung
10.1.2 Exception-Hierarchie in C++ Die Basisklasse exception hat die folgende öffentliche Schnittstelle: namespace std { class exception { public: exception() throw(); exception(const exception&) throw(); exception& operator=(const exception&) throw(); virtual ~exception() throw(); virtual const char* what() const throw(); private: // ... }; } Davon leiten sich weitere ab, wie z.B. Breymann C++, c○ Hanser Verlag München Inhalt ◭◭ ◭ ◮ ◮◮ 414 zurück Ende
namespace std { } class logic_error : public exception { }; public: logic_error(const string& argument); Eigene Exception-Klassen sollten von den Exception-Klassen der Standardbibliothek abgeleitet werden. Breymann C++, c○ Hanser Verlag München Inhalt ◭◭ ◭ ◮ ◮◮ 415 zurück Ende
- Seite 364 und 365: } Bekanntenkreis.Hinzufuegen(&P); S
- Seite 366 und 367: 8.7.4 „Benutzt“-Beziehung Ein O
- Seite 368 und 369: ReturnDatentyp Klassenname::operato
- Seite 370 und 371: 1. Der Aufruf wird entsprechend der
- Seite 372 und 373: drei Fälle für gemischte Datentyp
- Seite 374 und 375: Ohne Typumwandlungskonstruktor Um g
- Seite 376 und 377: Mit Typumwandlungskonstruktor Wenn
- Seite 378 und 379: 9.1.2 Ausgabeoperator
- Seite 380 und 381: ✬ ✩ Vektor-Objekt start xDim (=
- Seite 382 und 383: Zuweisungsoperator Vektor& operator
- Seite 384 und 385: template inline void Vektor::init(c
- Seite 386 und 387: Zuweisung von Vektorelementen per W
- Seite 388 und 389: Möglicher Einsatz: Vektor v(5); //
- Seite 390 und 391: template inline Vektor &Vektor::ope
- Seite 392 und 393: 9.2.3 Mathematische Vektoren Vektor
- Seite 394 und 395: 9.2.4 Multiplikations-Operator Anwe
- Seite 396 und 397: * Operator für den Fall v1 = zahl*
- Seite 398 und 399: Um bereits vor der Konstruktion ein
- Seite 400 und 401: void Datum::aktuell() { // Systemda
- Seite 402 und 403: Der Postfix-Inkrementierungsoperato
- Seite 404 und 405: datum.h #include class Datum { // .
- Seite 406 und 407: Es ist sowohl die implizite als auc
- Seite 408 und 409: 3. errno setzen 4. Fehlerbehandlung
- Seite 410 und 411: Wege zur Fehlerbehandlung: • Den
- Seite 412 und 413: gegebenenfalls weitere catch-Blöck
- Seite 416 und 417: Breymann C++, c○ Hanser Verlag M
- Seite 418 und 419: Große Teile des Konzepts sind durc
- Seite 420 und 421: 11.1 Die C++ Standardbibliothek, ge
- Seite 422 und 423: 11.1.1 Abstrakte und implizite Date
- Seite 424 und 425: 11.1.2 Bauelemente Container Klasse
- Seite 426 und 427: Allen Containern gemeinsam sind auc
- Seite 428 und 429: Iteratoren = Objekte, die auf Eleme
- Seite 430 und 431: Vorhandene Algorithmen: for_each fi
- Seite 432 und 433: } int Zahl = 0; do { cout > Zahl; I
- Seite 434 und 435: Variante 2: Prototyp durch Template
- Seite 436 und 437: } do { cout > Zahl; // Benutzung vo
- Seite 438 und 439: 11.2 Iteratoren im Detail Iteratore
- Seite 440 und 441: 11.2.1 Iteratorkategorien → sind
- Seite 442 und 443: • Random-Access-Iterator wie Bidi
- Seite 444 und 445: Ja. Schwachstelle: • Die Algorith
- Seite 446 und 447: Wie funktioniert dies im einzelnen?
- Seite 448 und 449: 11.2.3 Markierungen und Identifizie
- Seite 450 und 451: 11.3 Zusammenfassung der STL-Eigens
10.1.2 Exception-Hierarchie in <strong>C++</strong><br />
Die Basisklasse exception hat die folgende öffentliche Schnittstelle:<br />
namespace std {<br />
class exception {<br />
public:<br />
exception() throw();<br />
exception(const exception&) throw();<br />
exception& operator=(const exception&) throw();<br />
virtual ~exception() throw();<br />
virtual const char* what() const throw();<br />
private:<br />
// ...<br />
};<br />
}<br />
Davon leiten sich weitere ab, wie z.B.<br />
<strong>Breymann</strong> <strong>C++</strong>, c○ Hanser Verlag München<br />
Inhalt ◭◭ ◭ ◮ ◮◮ 414 zurück Ende