Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "buchung.h"
- #include "string.h"
- #include <iostream>
- using namespace std;
- Buchung::Buchung()
- {
- this->verwendungszweck = NULL;
- }
- Buchung::~Buchung()
- {
- delete(this->verwendungszweck);
- }
- Buchung::Buchung(float newBetrag, char * newVerwendungszweck)
- {
- this->betrag = newBetrag;
- this->verwendungszweck = newVerwendungszweck;
- }
- Buchung::Buchung(const Buchung & other)
- {
- ;
- }
- Buchung Buchung::operator=(const Buchung & other)
- {
- ;
- }
- void Buchung::info()
- {
- cout << "\t\tBuchung:" << endl;
- cout << "\t\tBetrag:\t\t" << this->betrag << endl;
- cout << "\t\tVerwendugnszweck:\t" << this->verwendungszweck << endl;
- }
- void Buchung::setBetrag(float newBetrag)
- {
- this->betrag = newBetrag;
- }
- float Buchung::getBetrag()
- {
- return this->betrag;
- }
- void Buchung::setVerwendungszweck(char * neu)
- {
- if (neu != NULL)
- {
- delete(verwendungszweck);
- verwendungszweck = strdup(neu);
- }
- }
- char * Buchung::getVerwendungszweck()
- {
- return this->verwendungszweck;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement