Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auswertung von Vektoren

Empfohlene Antworten

Hi leute

hab schon wieder ein Problem!!

Und zwar habe ich eine Klassen konstruiert und nun möchte ich mir einen vektor aufbauen in dem ich sämtliche Objekte dieser klasse speichere und anhand des Namens im vector ausfindig machen und mir das konkrete Objekt ausgeben lassen.

Hier ist mein Code

class GatterTyp

{

protected:

    string name;

	double grundlaufzeit;

	short lastFaktor;

	short lastkapazitaet;

	short eingaenge;	

public:

GatterTyp();

~GatterTyp() {}

const string& getname() {return name;}

double getgrundlaufzeit() {return grundlaufzeit;}

short getlastFaktor() {return lastFaktor;}

short getlastkapaziteat() {return lastkapazitaet;}

short geteingaenge() {return eingaenge;}

virtual bool getIsFlipFlop() {return false;}

void setname(string n) {n=name;}

void setgrundlaufzeit(double gl) {gl = grundlaufzeit;}

void setlastFaktor(short lF) {lF = lastFaktor;}

void setlastkapazitaet(short lk) {lk = lastkapazitaet;}

void seteingaenge(short ei) {ei = eingaenge;}

};
class Bibiothek{

private:

	vector<GatterTyp*> bibElemente;

	public:

	Bibiothek();

	~Bibiothek() {}

	GatterTyp*getbibElemente(string typ);
#include "Klassen.h"

#include <vector>

#include <fstream>



GatterTyp*Bibiothek::getbibElemente(string typ)

{   GatterTyp e;


  vector<GatterTyp*>::iterator it;

	for(it=bibElemente.begin();it!=bibElemente.end();++it)

	{if(*it.getname()==typ){return GatterTyp;break;};};

}

Hatt vieleicht jemand von euch eine Idee wie man das machen könnte??

Gruß Paolo:D

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.