// Funktionsdefinition
bool diffAutomat(const Automat &a1, const Automat &a2) {
  if( a1.get_standort() == a2.get_standort() ) {
    return true;
  }
  else {
    return false;
  }
}
// Funktionsdefinition
bool diffAutomat(Automat a1, Automat a2) {
  if( a1.get_standort() == a2.get_standort() ) {
    return true;
  }
  else {
    return false;
  }
}
Example #3
0
int main()
{
	int counter = 0;
	while (counter != 2)
	{
		std::unique_ptr<Automat> device_ptr(new Automat);
		vector<Automat> Vdevice(2);
		Automat device;
		// Initialisieren
		device_ptr->init(10000, "Bonn, Hauptstraße 123");

		Vdevice[0].init(20000, "Augsburg, Fuggerweg 345");
		Vdevice[1].set_geld(25000);
		Vdevice[1].set_standort("Berlin, Berliner Allee 567");

		device.init(123456, "Frankfurt, Goethestraße 123");

		// Ausgabe
		cout << device_ptr->get_geld() << endl;
		cout << device_ptr->get_standort() << endl;

		for (size_t i = 0; i < Vdevice.size(); i++)
		{
			cout << Vdevice[i].get_geld() << endl;
			cout << Vdevice[i].get_standort() << endl;
		}
		cout << device.get_geld() << endl;
		cout << device.get_standort() << endl;
		counter++;
	}
	return 0;
}
// Funktionsdefinition
bool Automat::diffAutomat(const Automat &a1) {
  if( get_standort() == a1.get_standort() ) {
    return true;
  }
  else {
    return false;
  }
}